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

EXC_BAD_INSTRUCTION when using programatically #3

Closed
ctews opened this issue Dec 23, 2014 · 2 comments
Closed

EXC_BAD_INSTRUCTION when using programatically #3

ctews opened this issue Dec 23, 2014 · 2 comments

Comments

@ctews
Copy link

ctews commented Dec 23, 2014

Hey guys,

I'm not using storyboard or any nib files to build up my view - just doing it manually. To give you a short overview:

I've a custom class which inherits from RAMAnimatedTabBarController. In the viewDidLoad of my custom class I call super.viewDidLoad which calls the one of RAMAnimatedTabBarController.

Then I got the described error in line:157:

func createViewContainers() -> NSDictionary {
    // ...
    let itemsCount : Int = tabBar.items!.count as Int - 1
    // ...
}

tabBar.items is by default nil, at least the public api says it:

var items: [AnyObject]? // get/set visible UITabBarItems. default is nil. changes not animated. shown in order

So I guess here is the problem. Would be nice if you can give a hint on how to implement your controller manually. I followed the steps you show up and exchanged all UITabBar* classes with the ones you declared and set the animation but as said it crashes on the viewDidLoad of the RAMAnimatedTabBarController.

@ctews
Copy link
Author

ctews commented Dec 23, 2014

Ok sorry, my code was just dumb -.-

@ctews ctews closed this as completed Dec 23, 2014
@y0dev
Copy link

y0dev commented Jan 12, 2016

@ctews Can you give me a hint on trying to figure it out. I'm having the same problem

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

2 participants