我瞭解塊對象是如何工作的 - 但我還沒有碰到過這種類型的塊對象的到來,林不知道下面的代碼做什麼:塊對象需要進一步解釋
[localSearch startWithCompletionHandler:^(MKLocalSearchResponse *response, NSError *error) {
if (!error) {
int i = 0;
do {
MKMapItem *mapItem = [response.mapItems objectAtIndex:i];
[self.mapItems addObject:mapItem];
i++;
} while (i < response.mapItems.count);
[[NSNotificationCenter defaultCenter] postNotificationName:@"Address Found" object:self];
} else {
[[NSNotificationCenter defaultCenter] postNotificationName:@"Not Found" object:self];
}
}];
}
我將是巨大的,如果有人能提供關於這裏發生了什麼的解釋。
如果你「瞭解塊對象是如何工作的」,那麼你究竟在這裏不瞭解什麼? –