Yes, I know that this question is very popular here and has been given a lot of answers to this question, and yes, I was here Passing Data between View Controllers. But I can't do it for a long time.
in ViewControllerB.h I create a property for the BOOL
@property(nonatomic) BOOL *someBool;
ViewControllerA.m:
#import "ViewControllerB.h"
ViewControllerB *viewControllerB = [[ViewControllerB alloc] init];
viewControllerB.someBool = YES;
[self.navigationController pushViewController:viewControllerB animated:YES];
In ViewControllerB.m ViewDidLoad:
NSLog(@"%@", self.someBool);
But xCode give me error on this line ( NSLog(@"%@", self.someBool);) and say: Thread 1:EXC_BAD_ACCESS (code =2)
. What am I doing wrong?