Fighting for my app to work on both the iPhone 5 and the smaller iPhone. Would be glad to require iOS6 and use Autolayout, because it works great.
However, the application has 4 buttons that regularly change positions, so I assign each button a different location from the array, and then animate the movement with something like this:
[UIView animateWithDuration:0.5 animations:^{ button1.center = [[locations objectAtIndex:0] CGPointValue]; button2.center = [[locations objectAtIndex:1] CGPointValue]; button3.center = [[locations objectAtIndex:2] CGPointValue]; button4.center = [[locations objectAtIndex:3] CGPointValue]; }];
This does not work with Autolayout. Nothing changes. The best I got is that it will animate the position, and then immediately bounce back.
When I delete Autolayout, however, all buttons are compressed on smaller iPhones, and since I use dots set to the size of iPhone 5, they end below, placing the bottom line on the screen. The original had different CGPoint numbers that I received from Interface Builder, but they were "wrong", although I think they were "wrong" because they were numbers for using Autolayout. Array so you can see:
buttonLocations = [NSArray arrayWithObjects: [NSValue valueWithCGPoint:CGPointMake(57, 523)], [NSValue valueWithCGPoint:CGPointMake(109, 523)], [NSValue valueWithCGPoint:CGPointMake(57, 471)], [NSValue valueWithCGPoint:CGPointMake(109, 471)], nil];
What should I do to fix this problem? Setting different points for each device size does not seem very effective.