blob: e8b500b430ceffb2f122cb8f6dd51c14ad797220 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#import "MGLTViewController.h"
#import "MapboxGL.h"
@implementation MGLTViewController
{
MGLMapView *_mapView;
}
- (void)viewDidLoad
{
[super viewDidLoad];
_mapView = [[MGLMapView alloc] initWithFrame:self.view.bounds
accessToken:@"pk.eyJ1IjoianVzdGluIiwiYSI6Ik9RX3RRQzAifQ.dmOg_BAp1ywuDZMM7YsXRg"];
_mapView.viewControllerForLayoutGuides = self;
_mapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self.view addSubview:_mapView];
}
- (void)insetMapView
{
_mapView.frame = CGRectInset(_mapView.frame, 50, 50);
}
- (void)resetMapView
{
_mapView.frame = self.view.bounds;
}
@end
|