2014-09-22 94 views

回答

1

試試這個:

NSString *actionUrl = @"linkedin://#profile/52458178"; 
NSString *actionUrlWeb = @"http://www.linkedin.com/in/chetankedawat"; 

BOOL canOpenURL = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:actionUrl]]; 

if (canOpenURL){ 
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:actionUrl]]; 
} else { 
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:actionUrlWeb]]; 
} 
+1

Nops。它不工作。它只是打開我的主頁。 – 2014-09-24 06:39:19