Reputation: 8782
I am working with SWRevealViewController. used this code
@IBOutlet weak var menuButton: UIBarButtonItem!
override func viewDidLoad() {
super.viewDidLoad()
if self.revealViewController() != nil {
menuButton.target = self //.revealViewController()
menuButton.action = Selector("backAction")
menuButton.image = UIImage(named: "back_arrow")
menuButton.title = ""
self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
}
func backAction()
{
self.navigationController?.popViewControllerAnimated(true)
}
But now i want 1 view controller with out this functionality. i.e. i don't want menu button for "Login" need just simple push with back button.
Now i can't go back to Navigation Drawer or Main screen.
Any help will much appreciated.
Upvotes: 2
Views: 153
Reputation: 82759
reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key menuButton.' --> the error says
in your menuButton
is not connected properly in your storyboard, remove the connection once and again ,it will work
Upvotes: 2
Reputation: 40030
Make sure the menuButton
outlet is correctly connected in Interface Builder.
Upvotes: 1