i'm trying make custom tab bar images made , i'm having trouble. i'm trying add button tab bar , seems can't it. want this:
then adding animations button. how can go adding button? need subclass uitabbarcontroller? thank you!
you should implement delegate method of uitabbarcontrollerdelegate
:
func tabbarcontroller(_ tabbarcontroller: uitabbarcontroller, shouldselect viewcontroller: uiviewcontroller) -> bool { if viewcontroller == (self.tabbarcontroller?.viewcontrollers?[theindexofthebutton])! { // stuffs here return false } return true }
don't forget set self.tabbarcontroller?.delegate = self
Comments
Post a Comment