2010-05-20 90 views
0

有人會如此善意地解釋下面的陳述發生了什麼。我在id和mp之間被<MKAnnotation>搞糊塗了,這不是我之前見過的。符號混淆?

id <MKAnnotation> mp = [annotationView annotation]; 

千恩萬謝

加里

回答

2
id <MKAnnotation> mp 

意味着MP物體預計符合MKAnnotation協議(我想你做出的對象將在編譯時檢查儘可能分配)。