Closed iwheelbuy closed 6 years ago
For most use cases you don't need to subclass. I got it working in code by doing it this way.
let tabBarIconHome: RAMAnimatedTabBarItem = RAMAnimatedTabBarItem(title: "Title1", image: #imageLiteral(resourceName: "image").withRenderingMode(.alwaysOriginal), selectedImage: #imageLiteral(resourceName: "image"))
tabBarIconHome.animation = RAMBounceAnimation()
let tabBarIconProfile: RAMAnimatedTabBarItem = RAMAnimatedTabBarItem(title: "title", image: #imageLiteral(resourceName: "image").withRenderingMode(.alwaysOriginal), selectedImage: #imageLiteral(resourceName: "image").withRenderingMode(.alwaysOriginal))
tabBarIconProfile.animation = RAMBounceAnimation()
let homeNavController = UINavigationController(rootViewController: HomeVC())
homeNavController.tabBarItem = tabBarIconHome
let profileNavController = UINavigationController(rootViewController: ProfileVC())
profileNavController.tabBarItem = tabBarIconProfile
let tabController = RAMAnimatedTabBarController(viewControllers: [homeNavController, profileNavController])
window?.rootViewController = tabController
window?.makeKeyVisible()
This project prefer using storyboard
iconView
isnil
. why not checking it before unwrapping...