|
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Junior Member
Join Date: Jun 2009
Posts: 6
|
Ok, this isn't really a mapkit question, but just a problem I had while doing a mapkit tutorial..
Something that's confusing me a little bit, and this feels kinda like a stupid question! I did this tutorial and have since successfully incorporated it into my own project but I don't understand exactly what this is: Code:
You must Login or Register to view and contribute code! This is done to increase participation in helping one another out, if you have been helped please pass on the favor. - (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>) annotation{
MKPinAnnotationView *annView=[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"currentloc"];
annView.pinColor = MKPinAnnotationColorGreen;
annView.animatesDrop=TRUE;
annView.canShowCallout = YES;
annView.calloutOffset = CGPointMake(-5, 5);
return annView;
}
Is it a function? This kind of thing with the -(blabla *)bla: syntax has been throwing me off, what's with the star? If it's a function what is the name of the function, how is it actually called? I'm not sure what questions I should be asking to be honest, I just don't understand it! The reason it's causing me trouble is as I step through his code (the sample I downloaded that's up there with the tutorial), it jumps to this function at a certain point, but with mine it doesn't. Yet, commenting it out makes no difference to my code, while commenting his out simply switches the pin back to default colour of red (As it is specified as green in this function) but it still has no problem dropping the pin there. I don't know what I did or changed in my code that it doesn't run through this, the code looks exactly the same to me! Any help explaining what the function thing actually is would be much appreciated, I get the feeling this is a kinda stupid question and that I should really know this by now! |
|
|
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. Search Engine Friendly URLs by vBSEO 3.3.0 RC1 |




Linear Mode
