I am new to iPhone. Can someone explain this method declaration to me:
- (void)locationManager:(CLLocationManager *)manager
didFailWithError:(NSError *) error{
Here is what I am guessing:
(void)
- method does not return anythinglocationManager:
- ???(CLLocationManager *)manager
- this looks like a parameter. To a CLLocationManager.didFailWithError:
- This seems like the method name(NSError *) error
- This also seems like a parameter开发者_JAVA百科. I am somewhat confused about why there are parameters in two locations.
This is Objective C, not regular C, so the function name is interspersed with the parameters. locationManager
and didFailWithError
are both part of the function name.
Have a a look here: http://cocoadevcentral.com/d/learn_objectivec/
精彩评论