I am looking for a way to set the path of an NSPathControl to be "~/Desktop".
[_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];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With