1
我正在尋找一種方法將NSPathControl的路徑設置爲「〜/ Desktop」。NSPathControl設置路徑
我正在尋找一種方法將NSPathControl的路徑設置爲「〜/ Desktop」。NSPathControl設置路徑
[_pathControlOutlet setURL: [NSURL URLWithString: [@"~/Desktop"stringByExpandingTildeInPath] ]];
NSURL *pathURL = [_pathControlOutlet URL];
NSLog(@"%@",[[_pathControlOutlet URL]path]);
NSString *pathSegmentClicked = [[_pathControlOutlet clickedPathComponentCell]title];
NSLog(@"%@",pathSegmentClicked);
NSLog(@"%@",pathURL);
NSURL *pathURL = [NSURL fileURLWithPath:[@"~/Desktop stringByExpandingTildeInPath]];
[pathControl setURL:pathURL];
非常感謝你much.Now我想知道,我如何獲得所選擇的路徑的字符串。 – k4lls
我將其添加到我的答案。 – 2013-01-10 22:28:38