title: Xamarin iOS how to check if Location Services is off or app level device location is off
body: <p>I am new to Xamarin iOS and mobile dev in general. 
  I have a application which requires location services, on my view controller I have a button which takes the user to location settings for the app, however, if the main device location is off the user will not be able to do anything with the app level location setting. </p>
  
  <p>I am using this code on my button click event to take the user to the settings page.  </p>
  
  <pre class="lang-cs prettyprint-override"><code>if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0))
  {
      NSString settingsString = UIApplication.OpenSettingsUrlString;
      NSUrl url = new NSUrl(settingsString);
      UIApplication.SharedApplication.OpenUrl(url);
  }
  </code></pre>
  
  <p>I would like to know if there is a way to check if device level Location services are off and take the user to that settings page instead of app-level location settings and vice versa.</p>
  
  <p>Also how to take users to Location settings screen if device level location services is disabled.  I tried a few combinations but I am unsure what the NSUrl will be. </p>