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

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -