mikefrederick / MFSideMenu

Facebook-like side menu for iOS
Other
1.17k stars 291 forks source link

reason: '-[UINavigationController centerViewController]: unrecognized selector sent to instance #151

Closed niravspaceo closed 10 years ago

niravspaceo commented 10 years ago

Hello, When i push new view controller from SideMenuViewController(on tableviewdidselect method) , app crashes and the reason: '-[UINavigationController centerViewController]: unrecognized selector sent to instance. I don't know how to deal with this. Below is my code for push new controller

Thanks, Nirav

ghost commented 10 years ago

Typecast (UINavigationController*)self.menuContainerViewController.centerViewController, that may workout. But your crash says you are trying to access centerViewController with a navigational controller object instead of menuViewController. Double check the objects.

mikefrederick commented 10 years ago

@niravspaceo it seems you are calling centerViewController on a UINavigationController when you want to be calling it on your MFSideMenuContainerViewController.