-
Notifications
You must be signed in to change notification settings - Fork 118
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
Enable/Disable menuitem #125
Comments
I have tried several things:
This had no effect neither. The method is always called, but either it always causes the segues or always doesn't cause segue no matter what the value of [defaults boolForKey:@"login_active"] is... |
Have you tried to use the UITableViewDelegate method:
If you return nil tha cell should not be selectable and the segue should not be fired. |
I will try that, thanks Von meinem iPhone gesendet
|
I implemented it like you suggested:
But: The idea is that I have a login to secure sensitive data stored in the app, but that the user can opt out of logging in, if he chooses, too. |
If you have a simple project that I can test I will have a look at it. |
This project is not simple, it has many View Controllers. I would have to setup an example. But what I have found, is, if I use a normal segue instead of an unwind segue, it works. My theory is, that unwind segues can only segue to previously presented/executed view controllers, not to any view controller in the storyboards. At least that is my observation: --> User logins and out --> this works --> User logins, disables login, closes app, opens app, (no login view controller presented), enables login --> unwind segue doesn't work Obviously unwind segue to the login vc only works, if the login vc was previously open. I wanted to use unwind segues, because my app has many view controllers, and I wanted that, when the user logs out, memory occupied by a huge stack of controllers is freed ;-) |
Is it possible to enable/disable a menuitem programmatically depending on some value?
If yes, how?
The text was updated successfully, but these errors were encountered: