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

let menuView = BTNavigationDropdownMenu(title: items.first!, items: items) get error #19

Closed
85636682 opened this issue Nov 2, 2015 · 12 comments

Comments

@85636682
Copy link

85636682 commented Nov 2, 2015

let menuView = BTNavigationDropdownMenu(title: items.first!, items: items) get error

fatal error: unexpectedly found nil while unwrapping an Optional value
@sameid
Copy link

sameid commented Nov 3, 2015

I'm getting the same issue.

@nimblemindsapps
Copy link

same issue here

@avidalm9
Copy link

me too

@nimblemindsapps
Copy link

It fixed for me when I imported the whole source folder into xcode instead of just the swift file.

@jefferyleo
Copy link

Same issue! I wish the owner can fix it as soon as possible.

@javalnanda
Copy link

same issue !!

@bull-xu
Copy link

bull-xu commented Dec 6, 2015

For my project, the navigationController in line 190 causes this error, because I'm using a RESideMenu as the rootViewController of UIApplication.sharedApplication().keyWindow.

@bull-xu
Copy link

bull-xu commented Dec 6, 2015

The public init(title: String, items: [AnyObject]) constructor should also can specify a navigationController as a parameter to avoid this problem.

@128keaton
Copy link

same issue here

@PhamBaTho
Copy link
Owner

I added navigationController as a param when initiating BTNavigationDropdownMenu instance. Please check latest release 0.3 in CocoaPods
public init(navigationController: UINavigationController? = nil, title: String, items: [AnyObject])
Hope this issue can be solved. Feel free to reopen if anyone still experiences this issue.

@applecrusher
Copy link

applecrusher commented May 19, 2016

I am getting an error for line 218 in BTNavigationDropDownMenu:
let frame = CGRectMake(0, 0, titleSize.width + (self.configuration.arrowPadding + self.configuration.arrowImage.size.width)*2, self.navigationController!.navigationBar.frame.height)

Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)

I am not sure the issue. I am running Xcode 9 though. Any advice would be helpful please because I am new to swift.

@PhamBaTho
Copy link
Owner

@applecrusher the navigationController might be nill for some reasons. Check again navigationController or you can try new release of this library to see if it could resolve your issue.

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

10 participants