2013-01-10 278 views

回答

3
[_pathControlOutlet setURL: [NSURL URLWithString: [@"~/Desktop"stringByExpandingTildeInPath] ]]; 


NSURL *pathURL = [_pathControlOutlet URL]; 
NSLog(@"%@",[[_pathControlOutlet URL]path]); 

NSString *pathSegmentClicked = [[_pathControlOutlet clickedPathComponentCell]title]; 

NSLog(@"%@",pathSegmentClicked); 
NSLog(@"%@",pathURL); 
+0

非常感謝你much.Now我想知道,我如何獲得所選擇的路徑的字符串。 – k4lls

+0

我將其添加到我的答案。 – 2013-01-10 22:28:38

2
NSURL *pathURL = [NSURL fileURLWithPath:[@"~/Desktop stringByExpandingTildeInPath]]; 
[pathControl setURL:pathURL];