Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 4    Views: 47

sarahk
Code is Art
Profile
Posts: 159
Reg: Jul 16, 2014
Auckland
10,290
08/29/14 09:03 PM (10 years ago)

dataUrl and deviceOrientation

I've spent some time reviewing other apps on my iphone and ipad side by side to get a feel for how designers have tackled the size difference and orientation issues. It's been interesting getting my non-techy husband's perspective as well as my own. What I find clumsy he often doesn't etc. I can see a real need to know the orientation as well as deviceModel when I'm generating the json. I've been messing with Cubbyholes where this is a must if you want all the info to be visible but I can see the need in other apps too. Even custom html can be generated differently depending on orientation. I don't know how much of a biggie this is, or even if other people might want it but just wondering Orientation is on any feature list for the future.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
08/30/14 08:39 AM (9 years ago)
I find that Landscape orientation is mostly useful for photo and video viewing. Also, useful to see wide swaths (columns) of data (Excel-like). Thus, I lock my app to a Portrait-only orientation. That cuts out 1/2 of my work :-) Next is the device size, in height and in width. Auto-layout is the answer! Yet, during the early days I was scared off by auto-layout due to its quirks (as reported by magnificent coders I admire). It's much easier to use AutoLayout in conjunction with Xcode's Interface Builder and XIBs. I purposefully chose to do a Cubbyholes in 100% code because that forced me to learn things like CGRect. A shift of Cubbyholes to using Xcode's visual layout tool will expose me to new things to learn, such as "how do I figure out all the objects on the canvas that the User laid down?". Then AutoLayout can be employed in an easy manner, with a different set of frustrations! That's a good thing for me to learn, as Apple definitely is hinting for Developers to use Auto Layout with the impending new larger iPhones and new smaller Wearables. Perhaps, there is a happy and easier medium with CGRectPositioning library and technique: https://github.com/mvx24/CGRectPositioning -- Niraj
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
08/30/14 08:43 AM (9 years ago)
To do Auto Layout in code (not with Xcode's Interface Builder), perhaps PureLayout can help ease the coding pains: https://github.com/smileyborg/PureLayout
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
08/30/14 08:46 AM (9 years ago)
Ole Begemann's article persuaded me to rethink my doubts about the usefulness of Auto Layout: "How I Learned to Stop Worrying and Love Cocoa Auto Layout" http://oleb.net/blog/2014/03/how-i-learned-to-stop-worrying-and-love-auto-layout/ -- Niraj
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
08/30/14 08:51 AM (9 years ago)
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.