ios8 - UIWebView Recalculating the intrinsic content size when orientation changes -
uiwebview working whenever launched first in potrait mode.
but after switching landscape mode, though specify
- (void)viewwilltransitiontosize:(cgsize)size withtransitioncoordinator:(id<uiviewcontrollertransitioncoordinator>)coordinator { [super viewwilltransitiontosize:size withtransitioncoordinator:coordinator]; [self layoutsubviews]; }
please advise how can make uiwebview recalculate intrinsic contentsize of not rendered in landscape mode
just have use animatealongsidetransition:completion: method
- (void)viewwilltransitiontosize:(cgsize)size withtransitioncoordinator:(id<uiviewcontrollertransitioncoordinator>)coordinator { [coordinator animatealongsidetransition:^(id<uiviewcontrollertransitioncoordinatorcontext> context) { uiinterfaceorientation orientation = [[uiapplication sharedapplication] statusbarorientation]; // whatever } completion:^(id<uiviewcontrollertransitioncoordinatorcontext> context) { }]; [super viewwilltransitiontosize:size withtransitioncoordinator:coordinator]; }
Comments
Post a Comment