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
Post a Comment