Call Super's method in the overwritten method:
[super didRotateFromInterfaceOrientation: fromInterfaceOrientation];
Pregunta
I have made a subclass of UIViewController that handles landscape mode, then I subclassed my subclass, that is shown to the user. Now, I wan't to add a subclass in the landscape view, and have the size the same as the landscape view, but in order to get the frame I need to add the action
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
which I also used in my first subclass. However, when I do this, it ignores all the code in the superclass, and does that one thing (get the frame)
[[UIScreen mainScreen].landscapeFrame
or something like that (if it exists)Silly me, I forgot to add [super didRotateFromInterfaceOrientation: fromInterfaceOrientation];
Credit goes to Sanjay Chaudhry for noticing that, thanks! :)
Solución
Call Super's method in the overwritten method:
[super didRotateFromInterfaceOrientation: fromInterfaceOrientation];