macOS/iOS API解説

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

目次

initWithDomain:type:name:port:

ドメイン、タイプ、サービス名、ポートでネットサービスを初期化して返します
-(id)initWithDomain:(NSString *)domain:
             type:(NSString *)type:
             name:(NSString *)name:
             port:(int)port:

解説

ドメイン、タイプ、サービス名、ポートでネットサービスオブジェクトを初期化して返します。

返り値

( id )

オブジェクト()

引数

( NSString * )domain

ドメイン

( NSString * )type

タイプ

( NSString * )name

名前

( int )port

ポート

クラス

NSNetService

Instance Methods

使用可能

10.2

参照

- initWithDomain:type:name:

例文

//ネットサービスをつくる2
NSNetService *nService2 = [[NSNetService alloc] initWithDomain:@"local."
                                                        type:@"_ftp._tcp.local."
                                                        name:@"nService2"
                                                        port:80
                                                        ];