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 -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -