uiwebview - Hide back button in WebView in Swift -


first apologise if duplicated post didn't find specific answer throughout topics.

i have webview , button go page page, wanted hide button when webview can't go function:

    func hideshowbackbutton() {     if(webview.cangoback)     {         //show button     }     else     {         //hide button     } } 

then button shown want call press , go button function

@ibaction func backbutton(_ sender: any) {     webview.goback() } 

the problem don't know call func hideshowbackbutton since have 1 viewcontroller.

i tried put function here not working properly.

 func webviewdidstartload(_ webview: uiwebview) {   hideshowbackbutton() } 


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -