If you have a full-screen flow layout of "widgets," and the widgets are resizable, what is the vision/strategy for making the layouts consistent across devices and orientations? I've toyed around with a few ideas, but none have left me feeling that it was a great solution.
Here are some ideas that are unrelated.
a) Create a relationship between block size and screen real-estate so a block is a fixed physical size and that size is maintained between rotations and devices.
b) Invert the cell's width/height between orientations so a cell has the same ratio on rotation.
c) Invert the numberOfBlocksInViewport so the number of blocks is consistent on the device's physical axis.
d) Use the view's bound size for numberOfBlocksInViewport so each point (in terms of pixels) is a block so minimum sizing becomes easily achieved (Untested).
Hey Caylan,
I think this really comes down to what you're trying to achieve. For example, in the samples browser, the approach we chose was to choose a fixed block size. In this case we chose 6. Then we set the numberofBlocksinViewport's height to always be that size. However, the width we kept dynamic. the width is determined as : (viewport.width/viewport.height * size)
This creates a nice flow between different orientations and screen sizes, without your particularly caring about one or the other.
CGFloat size = 6;
return CGSizeMake(ceilf((self.view.bounds.size.width/self.view.bounds.size.height)*size), size);
-SteveZ
Steve, a few weeks ago we chatted about minimizing the rounding errors within embedded flow views. Did you have any new recommendations?
Hi Caylan,
I believe you were going to send me a snippet of your layout strategy, so that I could test it out, and see if there were some tweaks that could be made in our code to get rid of that extra padding.
If you could email that code to me, i'd be happy to take a look at it.
It has come to my attention that my email provider's email server was on a blacklist and some email recipients were blocking my email. I'm switching hosts and should have a bevy of lost emails heading your way.
Steve, please confirm receipt of email. Thanks!
Steve - I replied to your email using two different domains: caylan@semireg.com (hover hosting) and i@caylan.net (gmail). I'm also available on Skype at caylanlarson or iChat using i@caylan.net.