ios - UITabBarController shouldSelectViewController not pushing view controller Swift 3 -
i have 4 items in tab bar , 1 open uialertcontroller. done however, how can show modally? shows view controller black bg instead. i've read other posts should override shouldselectviewcontroller seems doesn't there. tried printing nothing shows.
here's code. should add code in class tabbarcontroller or in appdelegate? vc present below? i'm stuck here. have screenshot well
func tabbarcontroller(tabbarcontroller: uitabbarcontroller!, shouldselectviewcontroller viewcontroller: uiviewcontroller!) -> bool { if viewcontroller selluploadviewcontroller { if let newvc = tabbarcontroller.storyboard?.instantiateviewcontroller(withidentifier: "selluploadvc") { tabbarcontroller.present(newvc, animated: true) return false } } return true }
Comments
Post a Comment