Quantcast
Channel: HAPPY*TRAP » Objective-C
Viewing all articles
Browse latest Browse all 10

[Objective-C] カレントユーザのホームディレクトリのパスを取得する

$
0
0
カレントユーザのホームディレクトリのパスを取得する方法です。

NSHomeDirectoryメソッドを使います。
1
2
NSString *path = NSHomeDirectory();
NSLog(@"%@", path);

結果:
/Users/machi


環境
OS X 10.8
Xcode 4.4

Viewing all articles
Browse latest Browse all 10

Trending Articles