objective c - only for IOS 9, MKPlacemark initWithCoordinate:]: unrecognized selector -


only ios 9

-(void)getroutedirections{ mkdirectionsrequest *request = [[mkdirectionsrequest alloc] init]; [request setsource:[mkmapitem mapitemforcurrentlocation]]; 

crash line:

mkplacemark * placemark = [[mkplacemark alloc]initwithcoordinate:_location.coordinate]; } 

exception:

-[mkplacemark initwithcoordinate:]: unrecognized selector sent instance

answer larme comments:

- (instancetype)initwithcoordinate:(cllocationcoordinate2d)coordinate; available since ios10.

for ios 9 or earlier, initwithcoordinate:addressdictionary: available since ios 3.


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -