macOS/iOS API解説

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

目次

setCompletes:

ユーザーがテキストフィールドの入力を終えるかをセットします
-(void)setCompletes:(BOOL)completes:

解説

ユーザーがテキストフィールドの入力を終えるかをセットします。

返り値

( void )

なし

引数

( BOOL )completes

YES/NO

フレームワーク

ApplicationKit

クラス

NSComboBox

Instance Methods

使用可能

10.0

参照

-completes

例文

#import "MyObject.h"
NSTimer *timer=nil;

@implementation MyObject

- (IBAction)myAction:(id)sender
{

    id aSignature ;
    id invocation ;
    SEL aSelector ;
    aSelector  = @selector( timerControl );
    aSignature = [ self methodSignatureForSelector:aSelector ];
    invocation = [ NSInvocation invocationWithMethodSignature:aSignature ];
    [ invocation setTarget: self ];
    [ invocation setSelector: aSelector ];
    [ invocation invoke ];


                        
timer = [NSTimer scheduledTimerWithTimeInterval:1
                        invocation:invocation
                            repeats:YES];
}
- (IBAction)setComp:(id)sender
{
[myOutlet setCompletes:YES];
[[myOutlet window] display];
}
-(void) timerControl{
([myOutlet completes])?NSLog(@"YES"):NSLog(@"NO");


}
@end