setSuspended:
保留をセットします
-(void)setSuspended:(BOOL)suspended:
解説
保留をセットします。
返り値
( void )
なし
引数
( BOOL )suspended
YES/NO
フレームワーク
Foundation
クラス
NSDistributedNotificationCenter
Instance Methods
使用可能
10.0
参照
- addObserver:selector:name:object:suspensionBehavior:
- postNotificationName:object:userInfo:deliverImmediately:
- suspended
例文
- (IBAction)suspend:(id)sender { if ([[NSDistributedNotificationCenter defaultCenter] suspended]){ NSLog(@"suspended"); [sender setTitle:@"not suspended"]; [[NSDistributedNotificationCenter defaultCenter] setSuspended:NO]; }else{ NSLog(@"not suspended"); [sender setTitle:@"suspended"]; [[NSDistributedNotificationCenter defaultCenter] setSuspended:YES]; } }