![](/img/trans.png)
[英]UIActivityViewController's share feature without the view controller
[英]Opening mobile Safari's UIActivityViewController without pressing the share button
我已經在Ruby中制作了一個Web應用程序,該應用程序位於iPhone的主屏幕上,並且可以全屏打開, 而沒有默認的Apple工具欄和菜單欄 。
但是,這意味着我要隱藏打開Safari可愛的UIActivityViewController的按鈕。
有沒有一種方法可以強制在不單擊該按鈕的情況下將其打開? 即本質上建立一個按鈕,在我的應用程序中執行相同的功能(打開UIActionSheet)?
提前致謝。
您應該能夠做到這一點;
NSURL *url = [NSURL URLWithString:@"http://goo.gl"];
UIActivityViewController *activityViewController = [[UIActivityViewController alloc]
initWithActivityItems:@[url]
applicationActivities:nil];
[self presentViewController:activityViewController animated:YES completion:nil];
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.