|
JubeatPlus 3.9.11
|
A view controller presenting collaboration and event spots on a map. More...
#include <SettingsMapViewController.h>


Instance Methods | |
| (instancetype) | - init |
| Initialises the controller, its navigation-bar buttons, location manager, and spot store. | |
| (void) | - loadView |
| Builds the map, loading indicator, and prompt label, sizing them to the device idiom. | |
| (BOOL) | - currentLocationEnabled |
| Whether Core Location is enabled and authorised for use while in front. | |
| (void) | - requestList: |
| Requests the spot list for a region, cancelling any request already in flight. | |
| (void) | - pushCurrent: |
| Recentres the map on the current location, if enabled. | |
| (void) | - pushCorabo: |
| Recentres the map on the "Corabo" collaboration position. | |
| (void) | - locationManager:didChangeAuthorizationStatus: |
| Starts observing the user location once authorisation is granted. | |
| (void) | - observeValueForKeyPath:ofObject:change:context: |
| Recentres on the first user-location fix, then stops observing. | |
| (void) | - mapView:regionDidChangeAnimated: |
| Refreshes the visible annotations when the region changes, refetching if the map has moved far enough. | |
| (nullable MKAnnotationView *) | - mapView:viewForAnnotation: |
| Builds the pin view for a spot annotation. | |
| (void) | - mapView:annotationView:calloutAccessoryControlTapped: |
| Opens the tapped spot in Google Maps after confirming with an alert. | |
| (void) | - alertSelect: |
| Opens the pending map URL when the confirmation alert's second button is chosen. | |
| (void) | - downloaderFinished: |
| Parses the finished download into spot annotations, or the Corabo position. | |
| (void) | - downloaderError: |
| Stops the indicator when the spot-list download fails. | |
| (void) | - viewDidLoad |
| Centres the map on the initial region and requests its spot list. | |
| (void) | - viewDidUnload |
| Stops observing the user location and releases the map, indicator, and label. | |
| (void) | - viewWillAppear: |
| Forwards to the superclass. | |
| (void) | - viewDidAppear: |
| Starts observing the user location if needed and briefly ignores interaction events. | |
| (void) | - viewWillDisappear: |
| Stops observing the user location and drops the map delegate. | |
| (void) | - viewDidDisappear: |
| Forwards to the superclass. | |
| (BOOL) | - shouldAutorotateToInterfaceOrientation: |
| Whether to rotate to a given interface orientation; portrait orientations only. | |
| (UIInterfaceOrientationMask) | - supportedInterfaceOrientations |
| The supported interface orientations: portrait and portrait-upside-down. | |
| (BOOL) | - shouldAutorotate |
Whether the controller supports autorotation; always YES. | |
| (void) | - dealloc |
| Stops observing, drops the map delegate, and cancels the spot-list download. | |
| (void) | - mapClose |
| Closes the map; a no-op in the shipped binary. | |
| Instance Methods inherited from <AlertViewManagerDelegate> | |
| (void) | - alertSelect: |
Sent when the user taps a button in an alert built with makeAlert:. | |
| (void) | - alertClose: |
Sent when a UIAlertController -based alert finishes dismissing. | |
| Instance Methods inherited from <DownloaderDelegate> | |
| (void) | - downloaderProceed: |
| Sent periodically as data arrives, and once more on completion. | |
Properties | |
| MKMapView * | mapView |
| The map presenting the spot annotations. | |
| UIActivityIndicatorView * | indicator |
| The loading indicator shown while the spot list downloads. | |
| UILabel * | messageLabel |
| The label prompting the user to zoom in when the region is too wide. | |
| CLLocationManager * | locationManager |
| The location manager used to request and track authorisation. | |
| Downloader * | listDownloader |
| The downloader fetching the spot list. | |
| NSMutableDictionary * | dictSpot |
| The spots keyed by identifier, so each is dropped only once. | |
| NSString * | mapURL |
| The Google Maps URL opened from a spot's callout accessory. | |
A view controller presenting collaboration and event spots on a map.
| - (void) alertSelect: | (NSDictionary *) | info |
Opens the pending map URL when the confirmation alert's second button is chosen.
| info | The alert result, whose btnMessage carries the chosen button index. |
| - (BOOL) currentLocationEnabled |
Whether Core Location is enabled and authorised for use while in front.
YES when location services are on and authorisation is granted. | - (void) dealloc |
Stops observing, drops the map delegate, and cancels the spot-list download.
| - (void) downloaderError: | (id) | downloader |
Stops the indicator when the spot-list download fails.
| downloader | The downloader that errored. |
Reimplemented from <DownloaderDelegate>.
| - (void) downloaderFinished: | (id) | downloader |
Parses the finished download into spot annotations, or the Corabo position.
| downloader | The downloader that finished. |
Reimplemented from <DownloaderDelegate>.
| - (instancetype) init |
Initialises the controller, its navigation-bar buttons, location manager, and spot store.
| - (void) loadView |
Builds the map, loading indicator, and prompt label, sizing them to the device idiom.
| - (void) locationManager: | (CLLocationManager *) | manager | |
| didChangeAuthorizationStatus: | (CLAuthorizationStatus) | status |
Starts observing the user location once authorisation is granted.
| manager | The location manager reporting the change. |
| status | The new authorisation status. |
| - (void) mapClose |
Closes the map; a no-op in the shipped binary.
| - (void) mapView: | (MKMapView *) | mapView | |
| annotationView: | (MKAnnotationView *) | view | |
| calloutAccessoryControlTapped: | (UIControl *) | control |
Opens the tapped spot in Google Maps after confirming with an alert.
| mapView | The map whose callout accessory was tapped. |
| view | The annotation view whose accessory was tapped. |
| control | The tapped accessory control. |
| - (void) mapView: | (MKMapView *) | mapView | |
| regionDidChangeAnimated: | (BOOL) | animated |
Refreshes the visible annotations when the region changes, refetching if the map has moved far enough.
| mapView | The map whose region changed. |
| animated | Whether the change was animated. |
| - (MKAnnotationView *) mapView: | (MKMapView *) | mapView | |
| viewForAnnotation: | (id<MKAnnotation>) | annotation |
Builds the pin view for a spot annotation.
| mapView | The map requesting the view. |
| annotation | The annotation to build a view for. |
nil for the user-location annotation. | - (void) observeValueForKeyPath: | (nullable NSString *) | keyPath | |
| ofObject: | (nullable id) | object | |
| change: | (nullable NSDictionary *) | change | |
| context: | (nullable void *) | context |
Recentres on the first user-location fix, then stops observing.
| keyPath | The observed key path. |
| object | The observed object. |
| change | The change dictionary. |
| context | The observer context. |
| - (void) pushCorabo: | (nullable id) | sender |
Recentres the map on the "Corabo" collaboration position.
| sender | The button that triggered the action. |
| - (void) pushCurrent: | (nullable id) | sender |
Recentres the map on the current location, if enabled.
| sender | The button that triggered the action. |
| - (void) requestList: | (MKCoordinateRegion) | region |
Requests the spot list for a region, cancelling any request already in flight.
| region | The map region to request spots for; retained as the last requested region. |
| - (BOOL) shouldAutorotate |
Whether the controller supports autorotation; always YES.
| - (BOOL) shouldAutorotateToInterfaceOrientation: | (UIInterfaceOrientation) | interfaceOrientation |
Whether to rotate to a given interface orientation; portrait orientations only.
| interfaceOrientation | The orientation to test. |
| - (UIInterfaceOrientationMask) supportedInterfaceOrientations |
The supported interface orientations: portrait and portrait-upside-down.
| - (void) viewDidAppear: | (BOOL) | animated |
Starts observing the user location if needed and briefly ignores interaction events.
| animated | Whether the appearance is animated. |
| - (void) viewDidDisappear: | (BOOL) | animated |
Forwards to the superclass.
| animated | Whether the disappearance is animated. |
| - (void) viewDidLoad |
Centres the map on the initial region and requests its spot list.
| - (void) viewDidUnload |
Stops observing the user location and releases the map, indicator, and label.
| - (void) viewWillAppear: | (BOOL) | animated |
Forwards to the superclass.
| animated | Whether the appearance is animated. |
| - (void) viewWillDisappear: | (BOOL) | animated |
Stops observing the user location and drops the map delegate.
| animated | Whether the disappearance is animated. |
|
readwritenonatomicstrong |
The spots keyed by identifier, so each is dropped only once.
|
readwritenonatomicstrong |
The loading indicator shown while the spot list downloads.
|
readwritenonatomicstrong |
The downloader fetching the spot list.
|
readwritenonatomicstrong |
The location manager used to request and track authorisation.
|
readwritenonatomicstrong |
The Google Maps URL opened from a spot's callout accessory.
|
readwritenonatomicstrong |
The map presenting the spot annotations.
|
readwritenonatomicstrong |
The label prompting the user to zoom in when the region is too wide.