objective c - Checking for iOS Location Services -
i have view map , button (like maps app once) allows user center , zoom current location on map. if can not use locationservicesenabled method (always returns yes), should create bool attribute check if didfailwitherror method called , know if can call button method? thanks reading. edited: this code not work me. using simulator. getting yes when asking locationservicesenabled. // gets user present location. - (ibaction)locateuser:(id)sender { if([cllocationmanager locationservicesenabled]) { cllocationcoordinate2d coordinate; coordinate.latitude = self.mapview.userlocation.location.coordinate.latitude; coordinate.longitude = self.mapview.userlocation.location.coordinate.longitude; [self zoomcoordinate:coordinate]; } else { [[[[uialertview alloc] initwithtitle:@"warning." message:@"location services disabled." delegate:nil cancelbuttontitle:@"ok" otherbutto...