How to do isKindOfClass in Swift
How to do isKindOfClass in Swift
- Subject: How to do isKindOfClass in Swift
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Mon, 12 Sep 2016 14:08:49 +0700
I have a pure Swift class.
I want to do:
if self.dynamicType == SomeClass { … }
But the compiler won’t accept this (or any number of variations thereof).
isKindOfClass needs a “class object representing the Objective-C class to be tested”.
How can this be done?
Gerriet.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden