macOS/iOS API解説

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

目次

stringsByAppendingPaths:

レシーバの前に配列で現したパスを追加して返します
-(NSArray *)stringsByAppendingPaths:(NSArray *)paths

解説

パス(paths)の前にそれぞれレシーバの文字列とパス区切りを追加した配列を返します。

返り値

( NSArray * )

配列

引数

( NSArray * )paths

パス

クラス

NSString

Instance Methods

使用可能

10.0

参照

例文

#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{
NSString *str1 = @"aaa";
NSArray *arr=[NSArray arrayWithObjects:@"text1.txt",@"text2.txt",@"image/image.txt",nil];

[info setStringValue:[[str1 stringsByAppendingPaths:arr] description]];

}

@end