summaryrefslogtreecommitdiff
path: root/test/ios/MGLTViewController.m
blob: bdce2202d78d8cffb06e49939c012f38447e67f5 (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
#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.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

    [self.view addSubview:_mapView];
}

- (void)insetMapView
{
    _mapView.frame = CGRectInset(_mapView.frame, 50, 50);
}

- (void)resetMapView
{
    _mapView.frame = self.view.bounds;
}

@end