dizidir:Neden hızlı derleyici bazen kısa argüman ismini kabul etmiyor?
let closestStationAnnotations = closestAnnotations.filter({
$0.dynamicType === StationAnnotation.self
})
Cannot convert value of type (_) -> Bool to expected argument type (MKAnnotation) -> Bool
Ama kabul eder:: var closestAnnotations:[MKAnnotation]
hızlı derleyici kabul etmeyecektir neden merak ediyorum ben dışarı çalışıyorlar
let closestStationAnnotations = closestAnnotations.filter({
(annotation : MKAnnotation) -> Bool in
annotation.dynamicType === StationAnnotation.self
})
'En yakınAnonlamalar 'nasıl bildirilir? – Sulthan
Lütfen düzenlememe bakın! :) –
Bir böcek gibi kokuyor. “.dynamicType” ın [normal üye girişi] olmaması ile ilgili olduğunu düşünüyorum (https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Expressions.html#//apple_ref/doc/uid/TP40014097-CH32-ID400), ancak [özel bir ifade] (https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Expressions.html#//apple_ref/doc/uid/TP40014097-CH32-ID402). Fakat bunun hakkında makul bir açıklama bulamıyorum. – rintaro