macOS/iOS API解説

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

目次

pathForAuxiliaryExecutable:

バンドルの実行ファイル名を指定してフルパスを返します
-(NSString *)pathForAuxiliaryExecutable:(NSString *)executableName:

解説

バンドルの実行ファイル名を指定してフルパスを返します。

返り値

( NSString * )

実行ファイル名

引数

( NSString * )executableName

実行ファイル名

クラス

NSBundle

Instance Methods

使用可能

10.0
iOS2.0

参照

例文

#import "SetImage.h"

@implementation SetImage

- (IBAction)set:(id)sender
{
//
    NSString *string;
        //このアプリ名は image となっているので次の行は@"image"となっている
        string = [[NSBundle mainBundle]  pathForAuxiliaryExecutable:@"image"];


    if (string!=nil){
 [str setStringValue:string];
    }else{
     [str setStringValue:@"Nil"];
       
    }
}

@end