LoginSignup
4
5

More than 5 years have passed since last update.

iOS8+SwiftでperformSelectorが使えない

Posted at

iOS8+Swiftでのメモ

performSelector関連メソッドが使えないです。
どうやらメモリーリークを起こすことがあるとかで廃止になっているようです。
Objective-C時代は、よく使用していたので困っていたところ、
やはりstackoverflowにありました。
http://stackoverflow.com/questions/24170282/swift-performselector-withobject-afterdelay
dispatch_afterを使って遅延実行を行うやり方が良いようです。

引数付きの場合もありました。
http://stackoverflow.com/questions/24158427/alternative-to-performselector-in-swift

さすがは、stackoverflow

4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5