Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9004497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:54:34+00:00 2026-06-16T00:54:34+00:00

I am showing the user location on a mapView with: self.mapView.showsUserLocation = YES; The

  • 0

I am showing the user location on a mapView with:

self.mapView.showsUserLocation = YES;

The user gets prompted the AlertView where he can choose whether to allow to use the current location or not.
If he presses yes everything is ok and I do not worry about it.

But if he presses NO I would like to zoom to a specific region.

So how do I know whether the MKMapView is allowed to use the current location?

I found the solution where I would create my own CLLocationManager and its delegate to see if it returns an denied error.
But this does not quite feel right, why introduce a new CLLocationManger if I do not need it.

Isn’t there an other way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:54:35+00:00Added an answer on June 16, 2026 at 12:54 am

    You don’t need a delegate. Just use the CLLocationManager class method authorizationStatus:

    if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusAuthorized) {
        // allowed
    } else {
        // not allowed
    }
    

    The possible values are:

    typedef enum {
       kCLAuthorizationStatusNotDetermined = 0,
       kCLAuthorizationStatusRestricted,
       kCLAuthorizationStatusDenied,
       kCLAuthorizationStatusAuthorized
    } CLAuthorizationStatus;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using map kit and showing user's location using showsUserLocation Im using following code
I need help with showing the user's location on my MapView. I have done
strong text I have grids showing to user and want to not allow sorting
When showing a project, the user can add a decision via a form_for and
I want to put a location path in my pages showing where the user
In map view, i'm showing current user location. On click on the pin its
I have a working app with an MKMapView showing user location. So far, so
In MKMapKit's map view control, i am showing the user's current location. A blue
Say I'm showing the user a form, and using a BackgroundWorker to do some
My idea is to have a view that is showing the user when something

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.