Device/Resolution independent positioning of GUI items on iOS
Device/Resolution independent positioning of GUI items on iOS
- Subject: Device/Resolution independent positioning of GUI items on iOS
- From: Alex Zavatone <email@hidden>
- Date: Mon, 19 Mar 2012 15:59:55 -0400
In the current project that I'm tasked to repair from the previous two programmers, I've come across a load of UI elements that have been hardcoded in place with the approach of: Just define the CGRect and we're all good.
Nothing is laid out in an xib file and sometimes the views are hardcoded or hardcoded relative to the rect/bounds of another view.
Needless to say, there are a few issues when looking at the project on different versions of iOS and on different devices.
At this point, so much is already created, I'm simply walking through the monolithic code and breaking it up into proper methods and new classes where necessary.
So, while it's nice to take a 40+ line mess and turn it into two method calls, I'm not 100% sure on the preferred approach for programmatically positioning elements and simply hardcoding them for the delegate for one class of devices doesn't seem like the proper approach.
Is the desired method or is there another way that I'm not seeing in the docs?
TIA,
- Alex Zavatone
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden