Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get type of class of delegate in swift

How can I know the type of class of a delegate?

self.delegate.isKindOfClass() and self.delegate.isMemberOfClass() are not working.

When I print println(self.delegate) It prints the caller controller class. But I cant check it.

like image 911
Sujisha Os Avatar asked Oct 27 '25 00:10

Sujisha Os


1 Answers

If you want to check if your delegate is kind of class use the following

if self.delegate is ExampleClass {

}
like image 51
JulianM Avatar answered Oct 29 '25 16:10

JulianM