title: UIButton setting frame not working?
body: <p>I have written the following code for my app:</p>
  
  <pre><code>self.PlayButton = [[UIButton alloc] init];
  
  //Setup Play Button
  [self.PlayButton setTranslatesAutoresizingMaskIntoConstraints:NO];
  self.PlayButton.frame = CGRectMake(self.view.frame.size.width * 0.38, self.view.frame.size.height * 0.666, self.view.frame.size.width * 0.48, self.view.frame.size.height * 0.29);
  [self.PlayButton setBackgroundImage:[UIImage imageNamed:@"PlayButton.png"] forState:UIControlStateNormal];
  [self.PlayButton.layer setMagnificationFilter:kCAFilterNearest];
  [self.PlayButton addTarget:self action:@selector(PlayButtonMethod) forControlEvents:(UIControlEvents)UIControlEventTouchUpInside]
  
  
  [self.view addSubview:self.PlayButton];
  </code></pre>
  
  <p>But when this code it run rather than the image appearing in a rather specific location it simply appears in the top left hand corner of the view. Almost like it had been set</p>
  
  <pre><code>self.PlayButton.frame = CGRectMake(0, 0, self.view.frame.size.width * 0.48, self.view.frame.size.height * 0.29);
  </code></pre>
  
  <p>It's odd because the width and height is put in correctly but for whatever reason the position of the button set by the CGRectMake is not taken into account. Ive done a bit of research into creating UIButtons in code and fro what I've seen not only has this happened to no-one else the code have written is perfectly liable.</p>
  
  <p>Any help would be appreciated.
      Thanks</p>