Monday, 15 April 2013

ios - What is the correct way to use a performSelector with returning value in Swift? -


I am creating a framework and testing app in Swift and I was thinking that to use the display What is the best way in Swift, because in Objective-C I could use it:

NSDictionary * values ​​= [framework executable: NSSelectorFromString (@ "getValues")];

So I want to call private method getValues ​​() my framework and method getValues ​​() Code> gives nsDictionary .

Now I am searching around and I have found some options for showSelector :

  - NSTimer NSThread.detachNewThreadSelector (Selector (" Method "), toTarget: with itself, object:" sunlight "}} - () UIControl.sendAction (selector (" method "), for: self, forEvent: zero)  
< P> But none of them are able to return the values, so my question is, what is the best way to implement it fast?

I also found out :, but I want to stick at pure speed


No comments:

Post a Comment