2012-11-13 66 views

回答

1

是的,你只需要知道你想要的應用程序的URL和iOS可以處理的其餘部分:

// This will open in Safari 
NSURL *url = [NSURL URLWithString:@"http://www.apple.com"]; 
[[UIApplication sharedApplication] openURL:url]; 

// This will open in Yelp 
NSURL *url = [NSURL URLWithString:@"yelp:///search?term=burritos"]; 
[[UIApplication sharedApplication] openURL:url]; 

另外還有內置對象做各種事情而無需離開應用程序。例如,this documentation描述瞭如何訪問用戶的照片,而不必實際切換應用程序。

相關問題