Closed SketchySwift closed 8 years ago
This is my implementation is Swift:
let tabBarController = self.window?.rootViewController as! YALFoldingTabBarController
let item1 = YALTabBarItem(itemImage: UIImage(named: "YourImage1"), leftItemImage: nil, rightItemImage: nil)
let item2 = YALTabBarItem(itemImage: UIImage(named: "YourImage2"), leftItemImage: nil, rightItemImage: nil)
let item3 = YALTabBarItem(itemImage: UIImage(named: "YourImage3"), leftItemImage: nil, rightItemImage: nil)
let item4 = YALTabBarItem(itemImage: UIImage(named: "YourImage4"), leftItemImage: nil, rightItemImage: nil)
tabBarController.tabBarView.offsetForExtraTabBarItems = YALForExtraTabBarItemsDefaultOffset
tabBarController.leftBarItems = [item1, item2]
tabBarController.rightBarItems = [item3, item4]
tabBarController.centerButtonImage = UIImage(named: "PlusIcon")
tabBarController.tabBarViewHeight = 80.0
tabBarController.tabBarView.backgroundColor = UIColor.clearColor()
tabBarController.tabBarView.extraTabBarItemHeight = 60.0
tabBarController.tabBarView.tabBarViewEdgeInsets = YALTabBarViewHDefaultEdgeInsets
tabBarController.tabBarView.tabBarItemsEdgeInsets = YALTabBarViewItemsDefaultEdgeInsets
Can you send me your project please!
I don't know how to use it completely with swift!
I can't share my project but I can try to solve your problem. The only issue I had was with translating this line: YALFoldingTabBarController *tabBarController = (YALFoldingTabBarController *) self.window.rootViewController;
but I have given the solution above. All the other instructions should be in the README.
How come you can't share your project? :(
could you create a repo?
Please update this to swift or create a tutorial on how to use it with swift!