I want to hide or show a UIButton weather user’s current location is visible on map. While testing the code xcode I can see meassage "User location view is NOT visible but should be. Showing...." on console in “didUpdateLocation” method if users location is not visible on map. How can I use this message to generate events in my case to hide or show a UIButton?
Thanks for any help in advance.
I want to hide or show a UIButton weather user’s current location is visible
Share
If you want to know whether the user location is contained in the currently displayed map region, you can check the
userLocationVisibleproperty in theregionDidChangeAnimateddelegate method:If you just want to know whether the user location currently has a value (whether it’s visible or not and whether showsUserLocation is on or not), then: