user3488542
user3488542

Reputation: 103

the best way to add custom button on tabbar center

when I use way to custom button like this What's the best way of adding a custom centre button to a tab bar?

[tabbarcontroller.view addsubview:button]

to add custom button on the view ,the navigationcontroller push to other viewController will use the method hidesBottomBarWhenPushed to hide the tabbar , but the button would stay on screen

or I use this [tabbarcontroller.tabBar addsubview:button] way to add on tabbar ,but my button would covered by the tabbar and can not receive the touch event.

please tell me the way to fix it ,and thanks for your answer

Upvotes: 0

Views: 1109

Answers (1)

MaappeaL
MaappeaL

Reputation: 524

The problem of your first option is that it's not hiding ? If so, you can hide it manually.

Upvotes: 1

Related Questions