Guest User

Untitled

a guest
Jul 20th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. struct MyStruct {
  2. enum Test: Int {
  3. case a
  4. }
  5. enum AnotherTest: Int {
  6. case b
  7. }
  8. }
  9.  
  10. let myThing: TYPE = someFunction(parameter)
  11. myThing.a //if TYPE is Test.self
  12. myThing.b //if TYPE is AnotherTest.self
  13.  
  14. struct MyStruct {
  15. enum Test: Int {
  16. case a
  17. case b
  18. }
  19. }
Add Comment
Please, Sign In to add comment