I have come across a strange behavior…
In class A, at the viewDidLoad method I do:
b = [[B alloc] initWithNibName:@"B" bundle:nil]; //init the B class (declared as B* b)
[b setText:@"ABCDDEEE"]; //change the text of a UITextView in b
note that b’s view is not shown until a button is pressed. However, when I press it and go to b’s view, the text of the UITextView is still the “lorem ipsun” text
Once b’s view is shown once, I can change the text.
Anyone know this issue and how to solve it??
That is expected behaviour.
initWithNibNamedoes not guarantee complete initialization beforeviewDidLoadis called.