VBRRollingPit
VBRRollingPit copied to clipboard
Using it programmatically
How can I use this programmatically?
I tried overriding the uitabbar on uitabbarcontroller but it doesnt show the tabbar
class CustomTabbarController:UITabBarController {
override var tabBar: RollingPitTabBar {
let tabbar = RollingPitTabBar(frame: CGRect(x: 0, y: 0, width: 414, height: 49))
tabbar.delegate = self
return tabbar
}
}
Sorry for the late answer! 1.: Could you move the instantiation of your tabbar to the init function of your TabBarController? 2.: Could you call self.view.addSubview(tabbar) after you initialised the tabbar?
something like this:
let myTabBar :RollingPitTabBar
public required init?(coder aDecoder: NSCoder) {
self.myTabBar = RollingPitTabBar(frame: CGRect(x: 100, y: 0, width: 414, height: 300))
super.init(coder: aDecoder)
self.view.addSubview(tabBar)
self.myTabBar.delegate = self
}
override var tabBar: UITabBar {
return myTabBar
}
I haven't tested it, so looking forward to your feedback.
will close this because of inactivity in a month, if u need still help please let me know