macOS/iOS API解説

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

目次

NSReleaseAlertPanel

アラートパネルを解放します
void  NSReleaseAlertPanel ( 
       id   alertPanel );

解説

アラートパネルを解放します。
NSGetAlertPanel、NSGetCriticalAlertPanel、NSGetInformationalAlertPanelでアラートパネルを作った後この関数で解放しなければいけません。

返り値

引数

( id )alertPanel

フレームワーク

ApplicationKit

クラス

NSReleaseAlertPanel

Function

使用可能

10.0

参照

例文

#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{
	id	panel;
	panel = NSGetCriticalAlertPanel (NSLocalizedString(@"title", @""),
                        NSLocalizedString(@"msg", @""),
                        NSLocalizedString(@"OK", @""), 
                        NSLocalizedString(@"Cancel", @""),nil);
	[panel orderFront: self];

	//[panel performClose: self];
	NSReleaseAlertPanel (panel);
}

@end