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

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -