SimformSolutionsPvtLtd / SSCustomTabbar

Simple Animated tabbar with native control
MIT License
596 stars 69 forks source link

How can i stop displaying Tabbar Item? #7

Closed CearsKhush closed 4 years ago

CearsKhush commented 5 years ago

Hello, Thanks for this library! I have some feature like guest login and I want to Restrict some tab bar item as If your doesn't logged in then user should not able to open that particular item and instead of this I am going to show some alert for example Please login first

Can you please help me with this that how can i Restrict some Tabbar Item?

KetanChopda commented 4 years ago

@CearsKhush

You can use UITabBarControllerDelegate for that kind of restriction. There is a method func tabBarController(_ tabBarController: UITabBarController, shouldSelect viewController: UIViewController) -> Bool for that.

You can use same method.