I am working in Xcode 4.5.2.
I have the following problem:
When i make projects from non-empty projects – that is the views are initialised from the storyboard, sometimes when i add the code
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
UIButton *b = [UIButton buttonWithType:UIButtonTypeRoundedRect];
b.frame = CGRectMake(20, 20, 100, 100);
[self.view addSubview:b];
to the viewDidLoad method it is recursively called again after the addSubview method call and sometimes (bless the sky) it doesn’t.
Can anyone tell me what’s the problem and how to solve it?
My gratitude.
Edit: As @WDUK correctly states, the following answer is wrong. It would explain recursive in
loadView, notviewDidLoad.Old, wrong answer: