| Home 目次>ApplicationKit>NSDrawer | |
drawerShouldClose:
close:で引き出しが閉じられようとした時に呼ばれます
-(BOOL) drawerShouldClose:(NSDrawer *)sender
【返り値】 | |
| BOOL | YES/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
![]() | |
この記事を評価してください。
| Home 目次>ApplicationKit>NSDrawer | 修正日2006.12.26 |