How check on button tapped GPS is Enabled Or Not in swift(ios)? if yes then start map otherwise go to gps menu -
please give code this.how check gps enabled or disabled @ particular tapped event .
please use below code -
-(ibaction)buttonaction:(id)sender { if cllocationmanager.locationservicesenabled() { // load map } else { uiapplication.sharedapplication().openurl(nsurl(string:uiapplicationopensettingsurlstring)!); } }
Comments
Post a Comment