PhamBaTho / BTNavigationDropdownMenu

The elegant yet functional dropdown menu, written in Swift, appears underneath the navigation bar to display a list of defined items when a user clicks on the navigation title.
MIT License
2.69k stars 411 forks source link

Getting "unexpectedly found nil while unwrapping an Optional value" in func menuButtonTapped(sender: UIButton) #82

Open ZahidKsoft opened 8 years ago

ZahidKsoft commented 8 years ago

I am getting this error on theonly available code line in func menuButtonTapped(sender: UIButton). My inititalization code menuView = BTNavigationDropdownMenu(title: eventName, items: items)

Please help me out..

ghost commented 7 years ago

I had the same problem. Solved it by moving the menu code call out where it was able to determine the size of the container (Viewcontroller). I tried calling from a button View, and that clearly failed.