macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

suspended

保留しているかを返します

解説

保留しているかを返します。

返り値

( BOOL )

YES/NO

引数

クラス

NSDistributedNotificationCenter

Instance Methods

使用可能

10.0

参照

- setSuspended:

例文

- (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];
	}
}