I'm trying to create a button programmatically and cannot change the origin. Here's the code:
UIButton *newButton = [UIButton buttonWithType:UIButtonTypeCustom];
newButton.frame = CGRectMake(100, 200, 150, 50);
[newButton setTitle:@"Hi There" forState:UIControlStateNormal];
[self.view addSubview:newButton];
The button shows up, but centered on the screen rather than the origin I specified. If I run an NSLog to show the frame numbers, I get 0, 0, 150, 50. Changing the size numbers works, but not the origin numbers.
I've also tried copying the frame, changing the origin, then putting the new frame on inside an animation block (just to see if I could modify the origin). The animation block worked in that I could change other items (like alpha), but nothing with the frame.
What am I missing?