ios - UIBarButtonItem for Safari? -


i’m writing app can open webpages in wkwebview. have standard share icon in navigation bar system initwithbarbuttonsystemitem:uibarbuttonsystemitemaction, option available time being opening page in safari.

share icon

seems waste of tap open uiactionsheet 1 menu option, button open webpage in safari directly.

i can't find system-standard uibarbuttonsystemicon "open in safari." there one? if there isn't, how people go this? i'm pretty sure i've seen them in wild, wire-frame safari icons in navigation bar. have find third-party 1 or repurpose 1 elsewhere in uikit? if so, where?

a couple days later, figured out.

the correct approach defer decision os, presenting uiactivityviewcontroller. activity view controller populate available activities (mail, message, twitter, facebook, copy, add reading list, etc.) according object you're passing thing want "share."

the catch system not provide default "open in safari" uiactivity—you have make 1 yourself. there third-party open source code available achieves this.


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -