Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support Programmatic without storyboard or nib. #86

Closed
arden opened this issue Feb 27, 2016 · 4 comments
Closed

support Programmatic without storyboard or nib. #86

arden opened this issue Feb 27, 2016 · 4 comments
Labels

Comments

@arden
Copy link

arden commented Feb 27, 2016

the animated-tab-bar support Programmatic without storyboard or nib?

@respan
Copy link

respan commented Mar 9, 2016

Yes. Something like this:

class TabBarController: RAMAnimatedTabBarController {
    override func viewDidLoad() {
        let tabAnimation = RAMBounceAnimation()
        tabAnimation.textSelectedColor = .redColor()
        tabAnimation.iconSelectedColor = .redColor()

        let tabBarItem = RAMAnimatedTabBarItem(title: "Example", image: UIImage(named: "Example"), selectedImage: nil)
        tabBarItem.textColor = .blackColor()
        tabBarItem.iconColor = .blackColor()
        tabBarItem.animation = tabAnimation

        let navigationController = UINavigationController(rootViewController: UIViewController())
        navigationController?.tabBarItem = tabBarItem  

        viewControllers = [navigationController!]

        super.viewDidLoad()
    }

@erinbleiweiss
Copy link

+1 for the above suggestion. This would be very useful

@respan
Copy link

respan commented Mar 25, 2016

But it's already supported :) You can try this code

@arden
Copy link
Author

arden commented Apr 18, 2016

this can write to readme.

@0ber 0ber closed this as completed Jun 14, 2016
@0ber 0ber added the question label Jun 14, 2016
@resand resand mentioned this issue Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants