开发者

Confused by notation?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜