I have a managedObject with an attribute that is a Boolean. I need to compare the value of this and then hide a button if required.
There's a couple of caveats, firstly the isBookmarkHidden boolean can be set and will override the property of the managedObject so the button is hidden regardless. If this boolean is NO it will then use the ManagedObject.
Here's the code snippet which is just in the viewDidLoad method ...
BOOL shouldHideBookmark = (int)[[managedObject valueForKey:@"isBookmarked"] description];
bookmarkButton.hidden = isBookmarkHidden == YES? YES : shouldHideBookmark == YES? YES : NO;
No matter how I write this code it doesn't seem to work. Any ideas?