Closed arden closed 8 years ago
Hi, just create something like this:
class MyTabBarController: RAMAnimatedTabBarController {
override func viewDidLoad() {
// create here your controllers, or override your init and pass them as parameters
let ViewController1 = UIViewController()
let oneNavigationController = UINavigationController(rootViewController: ViewController1)
let tbItema = RAMAnimatedTabBarItem(
title: "VIEW1",
image: UIImage(named: "icon1"),
selectedImage: UIImage(named: "icon1")
)
tbItema.animation = RAMBounceAnimation()
oneNavigationController.tabBarItem = tbItema
let ViewController2 = UIViewController()
let twoNavigationController = UINavigationController(rootViewController: ViewController2)
let tbItema = RAMAnimatedTabBarItem(
title: "VIEW2",
image: UIImage(named: "icon1"),
selectedImage: UIImage(named: "icon1")
)
tbItemb.animation = RAMBounceAnimation()
twoNavigationController.tabBarItem = tbItemb
self.viewControllers = [oneNavigationController, twoNavigationController]
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
Also Im not sure but I think you need to go to RAMAnimatedTabBarItem and delete IBOutlet and IBInspectable.
Tank you very match! It work fine!
i'm want to create a RAMAnimatedTabBarController programatically, there have some examples?