| Home 目次>ApplicationKit>NSApplication | |
isActive
そのアプリケーションがアクティブかを返します
-(BOOL) isActive
【返り値】 | |
| BOOL | YES/NO |
【解説】
そのアプリケーションがアクティブかを返します。
アクティブならYESを返します。
そうでなければNOを返します。
【例文】
#import "Controller.h"
@implementation Controller
- ( IBAction )pushButton:( id )sender
{
if ([[NSApplication sharedApplication] isActive]){
[info setStringValue: @"YES" ];
NSLog( @"Active" );
} else {
[info setStringValue: @"NO" ];
NSLog( @"Not Active" );
}
}
@end
![]() | |
この記事を評価してください。
| Home 目次>ApplicationKit>NSApplication | 修正日2007.12.21 |