I would like to create some logic to handle the view sizes for a subview and some buttons, based on the mainscreen size.
So I would like to do something like this: //Discover the main screen size (which would be different depending on the orientation
//Calculate the subview size based on the width divided by 3
//Calculate the button size based upon the width of the main screen //Calculate the spacing padding left and right for the button based on the main screen size width, and the button width...
What is the correct way to set this up? Also how do I create an object/var/value that holds the screen size then can be used again. Ideally I want to do the calculations once at the top of the implementation file and use the variables multiple times for different buttons in the application. All will be completed programatically as opposed to using interface builder.
Have you thought about using Autolayout ?? . Its much cleaner and easier to specify size relationship.