开发者

Confused by notation?

开发者 https://www.devze.com 2022-12-30 19:36 出处:网络
Would someone be so kind as to explain what is happening with the statement below. I an a bit puzzeled by <MKAnnotation> between id and mp, it not so开发者_开发知识库mething I have seen before.

Would someone be so kind as to explain what is happening with the statement below. I an a bit puzzeled by <MKAnnotation> between id and mp, it not so开发者_开发知识库mething I have seen before.

id <MKAnnotation> mp = [annotationView annotation];

many thanks

gary


id <MKAnnotation> mp

means that mp object is expected to conform to MKAnnotation protocol (and I suppose assignments you make to that objects will be checked at compile time whenever possible).


It tells you that the object returned will meet the protocol MKAnnotation

see Apple's objective-C concepts

0

精彩评论

暂无评论...
验证码 换一张
取 消