Problem using popViewController blinking white during transition

I struggled with switching between views using the UINavigationalController. I used this system many times without problems, but in my new application it does not work correctly.

Here is the problem: When I click on the new view controller, I use the following code:

NewViewController *newVC = [[NewViewController alloc] initWithNib:@"NewView" bundle:nil];
[self.navigationController pushViewController:newVC animated:YES];
[newVC release];

The code I use to return to the previous view inside the new VC:

[self.navigationController popViewControllerAnimated:YES];

I read that this could potentially release self.navigationController itself, so I implemented this code:

UINavigationController *nc = [self navigationController];
[nc popViewControllerAnimated:YES];

VC , , VC . ! viewWillAppear dealloc VC viewWillAppear + , dealloc newVC.

- , .

! ~

+3
3

, , , , clipsToBounds ViewController "TRUE"

-(void)viewDidLoad {
    [super viewDidLoad];
    self.view.clipsToBounds = YES;
}
+10

( ). - , , , .

0

FWIW, the same problem occurred to me in a Swift application. The main reason was that I did this:

self.navigationItem.rightBarButtonItem = nil

... to dynamically hide the button where it UIBarButtonItemhad an output in the current one UIViewController.

I really don't need a button IBOutletfor this button, so I deleted the output and it worked.

0
source

All Articles