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

How to use it with Code? #47

Closed
CharlinFeng opened this issue Aug 7, 2015 · 3 comments
Closed

How to use it with Code? #47

CharlinFeng opened this issue Aug 7, 2015 · 3 comments

Comments

@CharlinFeng
Copy link

i never use storyboard, i need use it in code,

i try it like this,bug it failed:

    let tabVC = AnimTabVC()

    let tabBar = UITabBar()
    let vc1 = UIViewController()
    vc1.title = "首页"
    let tabbarItem1 = RAMAnimatedTabBarItem()
    tabbarItem1.animation = RAMLeftRotationAnimation()
    tabbarItem1.title = "首页"
    tabbarItem1.image = UIImage(named: "main")
    vc1.tabBarItem = tabbarItem1

    let vc2 = UIViewController()
    let tabbarItem2 = RAMAnimatedTabBarItem()
    tabbarItem2.animation = RAMLeftRotationAnimation()
    tabbarItem2.title = "聊天"
    tabbarItem2.image = UIImage(named: "favorites")
    vc2.tabBarItem = tabbarItem2

    let vc3 = UIViewController()
    let tabbarItem3 = RAMAnimatedTabBarItem()
    tabbarItem3.animation = RAMLeftRotationAnimation()
    tabbarItem3.title = "我的"
    tabbarItem3.image = UIImage(named: "mine")
    vc3.tabBarItem = tabbarItem3
    tabVC.viewControllers = [vc1,vc2,vc3]
    tabBar.items = [tabbarItem1,tabbarItem2,tabbarItem3]

    tabVC.setValue(tabBar, forKey: "tabBar")





    tabVC.tabBar.tintColor = UIColor.redColor()
@trinhngocthuyen
Copy link

This happens when you add the library using CocoaPods.
Since most of the classes have the access level of internal, not public, you cannot declare your custom view controller as a subclass of RAMAnimatedTabBarController.
To quickly fix it, you can download this project and manually add it to your project.

@CharlinFeng
Copy link
Author

I did manually add it to my project without cocoapods,

I want to know how to use this with code ,not storyboard???

@daweedm
Copy link

daweedm commented Sep 29, 2015

I have the same problem, even when adding manually to the project

Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants