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

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

spring cloud - How to configure SpringCloud Eureka instance to point to https on non standard port -

javascript - Bootstrap Popover: iOS Safari strange behaviour -