viewWillTransitionToSize not called in iPad Simulator

1.2k views Asked by At

I'm trying to respond to rotation on the iPad, by overriding

- (void)viewWillTransitionToSize:(CGSize)size 
   withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator;

I've noticed that viewWillTransitionToSize gets called on my physical iPad, but not on the simulator, even with the same OS version (10).

Is there a setting on the simulator that I can use to make it respond, or is it a bug in the simulator? If there's no setting, how can I test my app on earlier OS versions using the simulator?

1

There are 1 answers

1
KavyaKavita On

Check your Parent view controller, if its calling super's viewWillTransitionToSize then only child view controller will be able to get call for this method. If you are using subclass of Navigatiopn controller or tabbarcontroller then add these methods and call super's method.