I just ran into a crash, showing an NSInvalidArgumentException with this message in an application that had not been done before.
The application tried to introduce a modally active UITabBarController: 0x83d7f00.
I have a UITabBarController that I create in AppDelegate and assign it an array of UIViewControllers .
One of them that I want to introduce when he tapped it. I did this by running the delegate method
- (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController
If this view controller belongs to the class of the one I want to represent modally, I return NO and do
[tabBarController presentModalViewController:viewController animated:YES]
And now I get this error, which apparently means that you cannot modally represent a view controller that is active somewhere else (on the tab ...) I have to say that I'm on Xcode 4.2 Developer Preview 7, so this is iOS 5 (I know about NDA, but I think that I do not give any forbidden data). I currently do not have an Xcode installation to check if it will compile with the iOS4 SDK, but I am almost completely sure that it does not.
I just wanted to ask, did anyone experience this problem or have any suggestion
ios objective-c ios5
Javier Soto Sep 15 2018-11-11T00: 00Z
source share