0
在線上發現的教程(例如http://bit.ly/SIXlI5)和Apple文檔中,沒有提及釋放MKMapItem或地標。他們是否需要被釋放,如果沒有,爲什麼不呢?地圖應用是否負責所有這些?我是否需要釋放MKMapItem或地標對象?
NSDictionary *address = @{
(NSString *)kABPersonAddressStreetKey: _address.text,
(NSString *)kABPersonAddressCityKey: _city.text,
(NSString *)kABPersonAddressStateKey: _state.text,
(NSString *)kABPersonAddressZIPKey: _zip.text
};
MKPlacemark *place = [[MKPlacemark alloc]
initWithCoordinate:_coords
addressDictionary:address];
MKMapItem *mapItem = [[MKMapItem alloc]initWithPlacemark:place];
NSDictionary *options = @{
MKLaunchOptionsDirectionsModeKey:MKLaunchOptionsDirectionsModeDriving
};
[mapItem openInMapsWithLaunchOptions:options];
嗨你有這個項目的樣本.. – Rajneesh071