エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
NSTimerとNSThreadの違い - 西尾泰和のはてなダイアリー
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
NSTimerとNSThreadの違い - 西尾泰和のはてなダイアリー
[[NSTimer scheduledTimerWithTimeInterval:10.0 target:self selector:@selector(aMethod:) userInfo:a... [[NSTimer scheduledTimerWithTimeInterval:10.0 target:self selector:@selector(aMethod:) userInfo:aInfo repeats:NO] fire] ってやった時に呼ばれるaMethodの引数はNSTimerのインスタンスだが [NSThread detachNewThreadSelector:@selector(aMethod:) toTarget:self withObject:aInfo]; ってやった時のaMethodの引数はaInfo自体。 なのでNSTimerの時には例えばaInfoがNSDictionaryなら NSDictionary* info = [timer userInfo]; とかやる。 あとNSTimerはあくまでメインスレッドの中で「あとでイベントを発生させる」ってスケジ