title: Understanding scaling sizes for UIViews and objects
body: <p>I am trying to better understand how to control the size of Views in terms of older iphones and the new iphones difference in size.</p>
  
  <p>If I have a design like the below example, how should this be coded programatically in terms of the subviews. </p>
  
  <p><img src="https://i.stack.imgur.com/eqlqp.jpg" alt="Example"></p>
  
  <p>Excuse the badly drawn diagram but it should help to explain. </p>
  
  <p>In this example, the fieldView and buttonView would always need to remain a fixed size as they have objects which would not look great when made smaller. However the logoview has another sub view for the logo itself, so could be shrinked depending on device/screen size.</p>
  
  <p>How would this be accomplished? Setting up the example subviews programatically. The part I do not understand is that in viewDidLoad where the subviews are created would you not have to create in order like this:</p>
  
  <pre><code>-(void)ViewDidLoad {
  CGRect screen = [[UIScreen mainScreen] applicationFrame];
  wholeView = [[UIView alloc] initWithFrame:CGRectMake(self.view.bounds.origin.x, self.view.bounds.origin.y, self.view.bounds.size.width, self.view.bounds.size.height)];
  
   logoView = [[UIView alloc] initWithFrame:CGRectMake(0,0,320,150);
  fieldView = [[UITableView alloc] initWithFrame:CGRectMake(0, logoView.bounds.size.height, 320, 100);
  </code></pre>
  
  <p>I understand about using </p>
  
  <blockquote>
    <p>autoresizingMask</p>
  </blockquote>
  
  <p>but how would it come into use in terms of working out a height depending on the actual view size available?</p>