I have static library and my custom view controller inside (f.e mainVC).
My static library will be built in some third party application.
I have to show mainVC.view instantly after third app did launch.
I do:
[window addSubView:mainVC.view];
but how can I do my mainVC active? It means I have to deny landscape orientation in
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
and this method never calls in this case.
I’ve also tried to call manually
[self.mainVC viewWillAppear:NO];
but still unsuccessful.
Maybe I should use
-(void)presentModalViewController:animated
but it’s deprecated. And I have to support IOS 4.3
You might want to check if the class is allowed to respond to the method before you call it.
This way you can use the deprecated method for support with IOS 4.3, and use another solution for later IOS versions