My project using ARC, so I can't use retain nor release, in ViewController A, I init ViewController B and add its view as a subview:
ViewControllerB *viewB = [[ViewControllerB alloc] init];
[self.view addSubview:viewB.view];
And in ViewControllerB, I make a button and when user click on it, the view will removed from superview:
[self.view removeFromSuperview];
And the result is EXC_BAD_ACCESS. Please help me and sorry about my English.
I think viewB is not local variable.