Question

I'm having a very very strange issue here. I have an App with a Tabbar Controller and 4 Tabs, each of them has a Navigation Controller hooked up to a Viewcontroller. Everything worked as it should, but now I have added a button to a couple of Views, which invokes a Modal View Controller to slide up and show some content. Within this Modal VC there's another button to hide the Modal View. After the Modal View gets hidden, if I tap the back-button in my navigation bar, the view doesn't animate back but just shows the previous view instantly without animation, while the navigation bar is indeed animated. But when I use the tab bar to switch to another View and immediately switch back, it suddenly starts working again.

I'm using iOS SDK 6 without Storyboards, since I have developed this app back on iOS 3.2 a few years ago

This is how I'm showing the Modal VC:

-(void)reportIssue{
    ReportIssueViewController *rivc = [[ReportIssueViewController alloc] initWithNibName:@"ReportIssueViewController" bundle:[NSBundle mainBundle]];
    [self.navigationController presentModalViewController:rivc animated:TRUE];
    [rivc release];
}

And this is how I'm hiding it:

- (IBAction)cancelIssue:(id)sender {
    [self dismissViewControllerAnimated:TRUE completion:NULL];
}

Has anyone ever had such a strange issue like this??? I would be happy about any ideas on how to get rid of this behaviour.

Thanks in advance.

Was it helpful?

Solution

I found the problem. I had subclassed the UITabbarController and I have added a -(void)viewWillAppear-function where I have put some logic. Unfortunately I forgot to add the [super viewWillAppear:animated] call inside of that function. Very stupid mistake.

Thanks to rdelmar, who pointed out the possible cause for this in the first comment of my question.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top