即時通訊嘗試使用一個簡單的條件來等同annotatio的標題,但它是行不通的任何人都可以告訴我什麼是我在這裏做錯了,即時通訊嘗試使用,如果條件,但我不能得到它的工作xcode
if([annotation title] == @"Parking")
{
pin.pinColor = MKPinAnnotationColorPurple;
}
當我打印的標題會顯示OK
NSLog(@" these are the titles %@",[annotation title]);
,但是當我嘗試匹配其使用條件,如果它不工作
任何幫助將十分讚賞
請多關照的任何建議或幫助
我們可以等同於一個以上的價值像像 其他語言,如果(標題==「停車」 ||標題==「汽車」)? – jarus 2011-06-16 19:57:31
當然可以。您可能需要購買此書供以後參考:http://www.amazon.com/gp/aw/d/0321566157/ref=redir_mdp_mobile/186-3555604-6642003 – 2011-06-17 03:24:02