Overriding the internal methods of the UIViewController because the internal method gives me errors

What are the consequences of overriding the internal methods of the UIViewController?

[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:]gives me some problems. It changes the size of my frame to values ​​that I sometimes do not want . I don’t even know where it selects the new frame values ​​(it is close to the size of the supervisor, where I add it, but it is disabled by 2px). Link: this question I also need help about.

I tried to define an empty method - (void)viewDidMoveToWindow:(UIWindow *)window shouldAppearOrDisappear:(BOOL)flagin my view controller. The error has disappeared ..> & L;

Does anyone know if it's worth doing an override -viewDidMoveToWindow:shouldAppearOrDisappear:? Or some other workaround?

Or does anyone know when and why he -viewDidMoveToWindow:shouldAppearOrDisappear:likes to resize a frame sometimes ?

Thanks in advance.

+2
source share
2 answers

If you override this method, you run the risk of getting a deviation; it is not documented. An approach that is consistent with the rules is to override the setFrame:presentation method in the view controller.

If you think this is a bug, collect a minimal test case and submit it to http://bugreport.apple.com and potentially download it somewhere, we can see exactly what is happening.

+2
source

"" ; :

  • ViewController (Navigation TabBar). ViewControllers , , .
  • . , , .

, setFrame:.

+2

All Articles