• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
performSelector in Swift
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: performSelector in Swift
      • From: Roland King <email@hidden>
    • Re: performSelector in Swift
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Suddenly, class interfaces in xib get more stuff
  • Next by Date: Re: performSelector in Swift
  • Previous by thread: Re: Suddenly, class interfaces in xib get more stuff
  • Next by thread: Re: performSelector in Swift
  • Index(es):
    • Date
    • Thread