performSelector in Swift
performSelector in Swift
- Subject: performSelector in Swift
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Fri, 11 Jul 2014 10:48:25 +0700
Swift has this method:
+cancelPreviousPerformRequestsWithTarget:selector:object:
which "Cancels perform requests previously registered with performSelector:withObject:afterDelay:."
But performSelector:withObject:afterDelay: seems NOT to exist in Swift (no Swift code in documentation).
The Swift with Obj-C book says: “The performSelector: method and related selector-invoking methods are not imported in Swift because they are inherently unsafe.”
So: what is the point of cancelPreviousPerformRequestsWithTarget in Swift?
What to do when porting code which uses performSelector?
There are several places where one needs to use performSelector:withObject:afterDelay:0 to execute something as soon as possible, but NOT in this event loop. How to do this in Swift?
Gerriet.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden