macOS/iOS API解説

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

目次

NSBeginInformationalAlertSheet

インフォメーション警告シートを作って表示します
void  NSBeginInformationalAlertSheet ( 
       NSString *   title , 
       NSString *   defaultButton , 
       NSString *   alternateButton , 
       NSString *   otherButton , 
       NSWindow *   docWindow , 
       id   modalDelegate , 
       SEL   willEndSelector , 
       SEL   didEndSelector , 
       void *   contextInfo , 
       NSString *   msg , 
       ...   ... );

解説

インフォメーション警告シートを作って表示します。
【title】 タイトル
【defaultButton】 デフォルトボタン
【alternateButton】 代理ボタン
【otherButton】 他のボタン
【docWindow】 ドキュメントウインドウ
【modalDelegate】 デリゲート
【willEndSelector】 終わろうとするときのセレクタ
【didEndSelector】 終わったときのセレクタ
【contextInfo】
【msg】 メッセージ

返り値

引数

( NSString * )title
( NSString * )defaultButton
( NSString * )alternateButton
( NSString * )otherButton
( NSWindow * )docWindow
( id )modalDelegate
( SEL )willEndSelector
( SEL )didEndSelector
( void * )contextInfo
( NSString * )msg
( ... )...

フレームワーク

ApplicationKit

クラス

NSBeginInformationalAlertSheet

Function

使用可能

10.0

参照

例文

#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{
NSBeginInformationalAlertSheet(
NSLocalizedString(@"title", @""),//タイトル
NSLocalizedString(@"OK", @""), //デフォルトボタン
NSLocalizedString(@"Cancel", @""),//代理ボタン
nil,//他のボタン
[sender window], //シートをつけるウインドウ
self,//デリゲート
@selector(seetEnd),//シート終了時に実行させるメソッド
NULL,//didDismissSelector
NULL,//contextInfo
NSLocalizedString(@"msg", @""));//メッセージ
}

- (void)seetEnd
{
NSLog(@"end");
}
@end