how to change layout on orientation change for tit

2019-08-22 02:31发布

问题:

I'm trying to make a spec on the ipad for an image gallery that has a 3x3 portrait layout but changes to a 3x2 layout on landscape.

I'm trying to get the landscape or portrait grid on application load and then change also on orientation change but every time I do change my orientation the thumbnails flicker and the grid is all out of wack.

http://pastebin.com/sLppSpS9

I'm thinking 'clear out or reset' the view, is there way to do that?

回答1:

I've done similar with Windows, rather than views - my approach was to .close() then .open() again, suited my needs, might be worth investigating with yours