I am trying to set a BOOL within Xcode and for some reason it is plain refusing to work. Nothing else is setting this bool, just this one instance. My code is below:
.h
@interface SuspectsViewController : UIViewController
{
BOOL boolContentChanged;
}
@property (nonatomic) BOOL boolContentChanged;
.m
@synthesize boolContentChanged;
-(IBAction)buttonPressed:(id)sender
{
boolContentChanged = true;
}
I have also tried using self.boolContentChanged but nothing happens either. To try and debug this I used po boolContentChanged and get the following output, the first po is before boolContentChanged = true and the second is after.
(lldb) po boolContentChanged
(BOOL) $4 = '\0' <nil>
(lldb) po boolContentChanged
(BOOL) $7 = '\0' <nil>
Does the $ indicate that it's pointing to a certain address, or is that purely for debugging reference?
Also, is there any reason this would be nil? Surely it doesn't need implicitly setting if it is a bool and not a pointer?
Any advice on this is much appreciated as I can't work it out, Thanks in advanced, Elliott