I am working with animations in iOS7 with objective-c. I am trying to use the animateWithDuration function which has the following definition:
[UIView animateWithDuration:(NSTimeInterval) animations:^(void)animations completion:^(BOOL finished)completion]
I can use this just fine, but it makes my code overly long because I have to put my animation and completion functions all in this declaration. I would like to create a separate function and pass it into the animation function call.
Specifically I would like to be able to have a separate completion function to use with multiple animations, which would also require the ability to pass it the parameter of a the specific view's id.
Could someone explain how to set up a function that can be passed into the animate function, and also what the '^' in the ^(void) and ^(BOOL) means?
Thanks