ios - Temporarily disable rotation (while an animation runs) -
i’m trying temporarily disable rotation of ipad while animation running. assumed correct way implement shouldautorotate
in view controller in question , return yes
or no
based on whether animation running (i have bool
that).
turns out, shouldautorotate
never called, it’s rotating anyway.
the view controller needs support interface orientations (i’ve tried implementing supportedinterfaceorientations
, returning uiinterfaceorientationmaskall
sure, made no difference), needs locked current 1 while little 0.5s animation takes place.
what missing here?
is view controller part of uinavigationcontroller's stack? if so, create custom subclass of uinavigationcontroller, override shouldautorotate in implementation, , forward call visible view controllers.
Comments
Post a Comment