title: how to set width and height of a UIVIew in pixels?
body: <p>I am working on an ObjectiveC app in which I need to set the width and height of a uiview in pixels and than scale that uiview equal to the devices width. The width and height values in pixels are fixed ( let say 900 px x 500 px).</p>
  
  <p>Currently I am doing this,</p>
  
  <pre><code>    UIScreen* mainScreen = [UIScreen mainScreen];
  
      CGRect frame = CGRectMake(0, 0, 900.0, 500.0);
      [view setFrame:frame];
      CGFloat valScale = mainScreen.bounds.size.width/900.0;
      [view setContentScaleFactor:valScale];
  </code></pre>
  
  <p>But this is not giving me the desired values. </p>
  
  <p>What should I do?</p>
  
  <p>(P.S) Does <code>view.frame.size.width</code> return the width in pixels or points? </p>