I have just begun learning Objective-C, coming from a VB .Net and C# .Net background. I understand pointer usage, but in Objective-C examples I see the asterisk placed in s
in the xcode4 documentation sample code you can see 3. all the time, for example in MoveMeView.m
#if 1
- (void)growAnimationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context {
#define MOVE_ANIMATION_DURATION_SECONDS 0.15
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:MOVE_ANIMATION_DURATION_SECONDS];
placardView.transform = CGAffineTransformMakeScale(1.1f, 1.1f);
/*
Move the placardView to under the touch.
We passed the location wrapped in an NSValue as the context.
Get the point from the value, then release the value because we retained it in touchesBegan:withEvent:.
*/
NSValue *touchPointValue = (NSValue *)context;
placardView.center = [touchPointValue CGPointValue];
[touchPointValue release];
[UIView commitAnimations];
}