-4

How to get the class of an anyObject type in Swift?

In Objective-C we can get it like so :

id obj = [obj class]
SOUA Hamza
  • 146
  • 2
  • 10

1 Answers1

1

The equivalent of [obj class] in SWIFT is :

obj.dynamicType
SOUA Hamza
  • 146
  • 2
  • 10