NSDrawer:drawerShouldClose:
Home 目次>ApplicationKit>NSDrawer

drawerShouldClose:

close:で引き出しが閉じられようとした時に呼ばれます


-(BOOL) drawerShouldClose:(NSDrawer *)sender


【返り値】
   BOOLYES/NO
【パラメータ】
   sender送信オブジェクト


【解説】

close:で引き出しが閉じられようとした時に呼ばれます。closeの場合は呼ばれません。
drawerWillClose:よりも先に呼ばれます。
YESを返すと引き出しは閉じられます。
NOを返すと閉じられません。



【例文】


#import "Drawerdeligate.h"
//drawerのデリゲート
@implementation Drawerdeligate

-(BOOL)drawerShouldClose:(NSDrawer *)sender
{
NSLog(@"drawerShouldClose");
return YES;
}

-(void)drawerWillClose:(NSNotification *)notification
{
NSLog(@"drawerWillClose");
}

@end


(C) 2000-2007 Satoshi Oomori.
[Apple]

Google
Webwww.oomori.com
Apple_Store_40x120

[ad:Usual day in Japan]

この記事を評価してください。 

良い 

間違いがある 説明がわかりにくい 例文がわかりにくい  

Home 目次>ApplicationKit>NSDrawer
修正日2006.12.26