I'm a bit confused with the difference between a UIViews layer and its frame. From what I understand, a layer is like an image representation of a view. So, say I implement a method like this in a UIView subclass:
-(void)translate
{
CATransform3D translate = CATransform3DIdentity;
translate = CATransform3DTranslate(translate, 20, 0, 0);
[UIView animateWithDuration:2 animations:^{
self.layer.transform = translate;
} completion:^(BOOL finished){
}];
}
So, if I want the view to actually be at that location at the end of the animation, what property to I change? Do I move the frame, and then set the transform to identity?