registerName:
ポートネームサーバーに名前を登録します
-(BOOL)registerName:(NSString *)name:
解説
ポートネームサーバーに名前を登録します。登録できればYESを返します。同じ名前があるなど、登録できなかった場合にはNOを返します。
返り値
( BOOL )
YES/NO
引数
( NSString * )name
名前
フレームワーク
Foundation
クラス
NSConnection
Instance Methods
使用可能
10.0
参照
- setRootObject:
- registerName:withNameServer:
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSConnection* theConnection; theConnection = [NSConnection defaultConnection]; [theConnection setRootObject:self]; if ([theConnection registerName:@"name"]){ NSLog(@"YES"); }else{ NSLog(@"NO"); } } @end