JubeatPlus 3.9.11
Loading...
Searching...
No Matches
SettingsMapViewController.h
Go to the documentation of this file.
1
13
14#import <CoreLocation/CoreLocation.h>
15#import <MapKit/MapKit.h>
16#import <UIKit/UIKit.h>
17
18#import "AlertViewManager.h"
19#import "Downloader.h"
20
21NS_ASSUME_NONNULL_BEGIN
22
26@interface SettingsMapViewController : UIViewController <CLLocationManagerDelegate,
27 MKMapViewDelegate,
30
35@property(strong, nonatomic, nullable) MKMapView *mapView;
36
41@property(strong, nonatomic, nullable) UIActivityIndicatorView *indicator;
42
47@property(strong, nonatomic, nullable) UILabel *messageLabel;
48
53@property(strong, nonatomic, nullable) CLLocationManager *locationManager;
54
59@property(strong, nonatomic, nullable) Downloader *listDownloader;
60
65@property(strong, nonatomic, nullable) NSMutableDictionary *dictSpot;
66
71@property(strong, nonatomic, nullable) NSString *mapURL;
72
78- (instancetype)init;
79
84- (void)loadView;
85
92
98- (void)requestList:(MKCoordinateRegion)region;
99
105- (void)pushCurrent:(nullable id)sender;
106
112- (void)pushCorabo:(nullable id)sender;
113
120- (void)locationManager:(CLLocationManager *)manager
121 didChangeAuthorizationStatus:(CLAuthorizationStatus)status;
122
131- (void)observeValueForKeyPath:(nullable NSString *)keyPath
132 ofObject:(nullable id)object
133 change:(nullable NSDictionary *)change
134 context:(nullable void *)context;
135
143- (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated;
144
152- (nullable MKAnnotationView *)mapView:(MKMapView *)mapView
153 viewForAnnotation:(id<MKAnnotation>)annotation;
154
162- (void)mapView:(MKMapView *)mapView
163 annotationView:(MKAnnotationView *)view
164 calloutAccessoryControlTapped:(UIControl *)control;
165
171- (void)alertSelect:(NSDictionary *)info;
172
178- (void)downloaderFinished:(id)downloader;
179
185- (void)downloaderError:(id)downloader;
186
191- (void)viewDidLoad;
192
197- (void)viewDidUnload;
198
204- (void)viewWillAppear:(BOOL)animated;
205
211- (void)viewDidAppear:(BOOL)animated;
212
218- (void)viewWillDisappear:(BOOL)animated;
219
225- (void)viewDidDisappear:(BOOL)animated;
226
232- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;
233
239- (UIInterfaceOrientationMask)supportedInterfaceOrientations;
240
246- (BOOL)shouldAutorotate;
247
252- (void)dealloc;
253
258- (void)mapClose;
259
260@end
261
262NS_ASSUME_NONNULL_END
263
264// code: language=Objective-C
265// kate: hl Objective-C;
266// vim: set ft=objc :
A shared alert presenter that hides the UIAlertController/UIAlertView split behind one API.
The HTTP client.
A one-shot HTTP request that reports its result to a delegate.
Definition Downloader.h:52
A view controller presenting collaboration and event spots on a map.
Definition SettingsMapViewController.h:29
Downloader * listDownloader
The downloader fetching the spot list.
Definition SettingsMapViewController.h:59
BOOL shouldAutorotate()
Whether the controller supports autorotation; always YES.
Definition SettingsMapViewController.m:257
void viewDidUnload()
Stops observing the user location and releases the map, indicator, and label.
Definition SettingsMapViewController.m:183
void dealloc()
Stops observing, drops the map delegate, and cancels the spot-list download.
Definition SettingsMapViewController.m:235
MKMapView * mapView
The map presenting the spot annotations.
Definition SettingsMapViewController.h:35
void viewDidLoad()
Centres the map on the initial region and requests its spot list.
Definition SettingsMapViewController.m:172
void loadView()
Builds the map, loading indicator, and prompt label, sizing them to the device idiom.
Definition SettingsMapViewController.m:120
NSString * mapURL
The Google Maps URL opened from a spot's callout accessory.
Definition SettingsMapViewController.h:71
UILabel * messageLabel
The label prompting the user to zoom in when the region is too wide.
Definition SettingsMapViewController.h:47
UIActivityIndicatorView * indicator
The loading indicator shown while the spot list downloads.
Definition SettingsMapViewController.h:41
BOOL currentLocationEnabled()
Whether Core Location is enabled and authorised for use while in front.
Definition SettingsMapViewController.m:264
void mapClose()
Closes the map; a no-op in the shipped binary.
Definition SettingsMapViewController.m:549
instancetype init()
Initialises the controller, its navigation-bar buttons, location manager, and spot store.
Definition SettingsMapViewController.m:81
CLLocationManager * locationManager
The location manager used to request and track authorisation.
Definition SettingsMapViewController.h:53
NSMutableDictionary * dictSpot
The spots keyed by identifier, so each is dropped only once.
Definition SettingsMapViewController.h:65
UIInterfaceOrientationMask supportedInterfaceOrientations()
The supported interface orientations: portrait and portrait-upside-down.
Definition SettingsMapViewController.m:252
The optional delegate of AlertViewManager.
Definition AlertViewManager.h:18
Performs a single HTTP request.
Definition Downloader.h:30