How to change Done Button Title on SFSafariviewController

与世无争的帅哥 提交于 2019-12-08 13:50:42

问题


I want to change the done button title appearance on SFSafariViewController navigation bar (iOS9.0 greater Versions).


回答1:


https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller/dismissbuttonstyle From iOS 11 onwards we have option to choose the button style from below 3 options: case done

case close

case cancel




回答2:


As Per Apple's documentation on SFSafariViewController, there does not appear to be a publicly-accessible way to change the title of the Done button.

If you want customised in app browser in iOS,Just use Some other WebView Browsers example like wkWebView.(If Browser was used to google sign in api we need Oauth2 process)




回答3:


You can only change Done button color but if you want to change Done button title then you must have to implement manual button at run time

change Done button color using this code

SFSafariViewController *safariViewController = [[SFSafariViewController alloc] initWithURL:webpageUrl];
[safariViewController.view setTintColor:[UIColor blueColor]];


来源:https://stackoverflow.com/questions/37958918/how-to-change-done-button-title-on-sfsafariviewcontroller

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!