ios - how to remove a bar button in swift 3? -


i have used swrevealviewcontroller having side menu , in having myaccount page use navigate myaccount page. according requirement placed tab bar in storyboard in 1 tab used account page , tab bar placed using storyboard , here while moving tab bar account page, need remove bar button placed in storyboard. can 1 me how implement ?

here image side menu here image tab bar placed

you can hide menu button setting nill in viewdidload

self.navigationitem.leftbarbuttonitem = nil; 

store controller identity in userdefault(sidemenu , tabbar) like

//leaving side menu account   userdefaults.standard.set("side", forkey: "menubutton")  //leaving side menu account userdefaults.standard.set("tab", forkey: "menubutton") 

when view disappear , check menubutton key in myaccount , show/hide menu button like

let controllername = userdefaults.standard.value(forkey: "menubutton")  if (controllername == "side") { } else { self.navigationitem.leftbarbuttonitem = nil; } 

Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -