-1

I have imported the QuartzCore framework enter image description here

I have imported the QuartzCore/CAAnimation.h file enter image description here

I have created a UIView Outlet
enter image description here

Here's my code enter image description here

I have placed a breakpoint in my code and it does get called but the image does not move. What am I missing?

rmaddy
  • 314,917
  • 42
  • 532
  • 579

1 Answers1

0

I figured out what the problem was. I was calling the method in viewDidLoad. Apparently the call gets overridden when placed there. I placed the call in viewWillAppear and the animation worked. If someone can explain why the call can't be in viewDidLoad I'm sure someone could use the explanation.

  • The @"position" of your UIView cannot be animated until it is laid out, and that doesn't happen in viewDidLoad. The earliest possible time to place your code would be in didLayoutSubviews I believe. – user1459524 Feb 21 '14 at 23:50