Try calling [super viewDidLoad]
before your animation. I suspect the LogoImageView to not being initialized yet at the time you do the animation.
I don't know if you've noticed too but the frame you set in the animation seems to be the same for both screen sizes
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
self.view.backgroundColor = [UIColor colorWithRed:51/255.0f green:204/255.0f blue:102/255.0f alpha:1.0];
// You can remove this line since you're already setting
// the origin position right after.
//
// self.LogoImageView.center = self.view.center;
BOOL isFourInchesScreen = [[UIScreen mainScreen] bounds].size.height == 568;
if (isFourInchesScreen) {
// IPHONE 4 i
//
self.LogoImageView.frame = CGRectMake(33, 156, 255, 255);
} else {
// iPhone 3.5 i
//
self.LogoImageView.frame = CGRectMake(33, 112, 255, 255);
}
[UIView animateWithDuration:1.0 delay:2.35f usingSpringWithDamping:.10 initialSpringVelocity:.50 options:UIViewAnimationOptionCurveEaseInOut animations:^{
self.LogoImageView.frame = CGRectMake(33, 48, 200, 200);
} completion:nil];
}
You can delete the dispatch_after
as well since it's there is a delay parameters on the animation method.
Hope that helps.