Is there anyway to make a class in iOS that then animates something? I know little to nothing about UIView animations and I want to know if it is possible and how. This is what I would like to turn into a class:
[UIView animateWithDuration:1.0
animations:^{
X = X + 19
}
completion:nil];
I dont know whether this is the best way but one way to do it is: create an objective-c class (subclass of UIView). Do your initializations in the initialization method. Then create an instance method where your put your animation code. eg
You call this method in your main view controller whenever required to do the animation.