Why does viewDidAppear not start?

I have a root view controller that inserts subview at index 0 in its viewDidLoad method.

I am trying to get subview to become firstResponder, but I can only do this from my understanding - in the subview method viewDidAppear.

here is the line of code I added to the viewDidLoad method of the root view controller:

        [self.view insertSubview: subViewController.view atIndex: 0];

subviewcontroller has xib, subViewController.xib, which displays correctly at runtime. however, subViewController viewDidAppear does not start.

any idea why this is happening? any idea how to fix this - besides calling viewDidAppear manually (this leads to the inability to become firstResponder)?

thanks,

mbotta p>

+3
2

, . subview . , , - Apple, , , .

, , :

SubviewController *controller = [[SubviewController alloc] init];
[[self navigationController] pushViewController:controller animated:YES];
[controller release], controller = nil;

. , .

+15

(, ) -viewDidAppear subviews. -viewDidAppear .

+10

Source: https://habr.com/ru/post/1722625/


All Articles