relativeString
関連パスを返します
解説
関連パスを返します。
http://www.oomori.com/aaa/bbb.html?ccc=123の場合、http://www.oomori.com/aaa/bbb.html?ccc=123が返されます。
返り値
( NSString * )
パスの文字列
引数
フレームワーク
Foundation
クラス
NSURL
Instance Methods
使用可能
10.0
参照
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSURL *url = [NSURL URLWithString:@"http://www.oomori.com/index.html#123?id=123"]; NSString *string; string = [url relativeString]; if (string != nil){ [info setStringValue:string]; }else{ [info setStringValue:@"Nil"]; } } @end