0
votes

Almost every example I've seen for the beginAnimations:Context: method has used nil (or NULL) for its parameters like this:

[UIView beginAnimations:nil context:nil];

But I found out that if I want to utilize other capabilities such as removeAnimationForKey then I must have a value for the context parameter. But I can't figure out what object type the context parameter is supposed to be because the class definition says it's a pointer to void: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIView_Class/UIView/UIView.html

Anybody familiar with how these parameters work in better detail?

1

1 Answers

0
votes

It can be any type you want. You pass it a pointer to anything, and you get that pointer back in delegate methods. Look at the documentation for context in beginAnimations:context:. In a delegate function, you then cast the void* to whatever you passed in in the first place.