summaryrefslogtreecommitdiff
path: root/platform/ios/test/MGLTViewController.m
blob: 451dea9292981536d01f4315c527e727c6c4f61d (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
32
33
34
#import "MGLTViewController.h"
#import <Mapbox/Mapbox.h>

@implementation MGLTViewController
{
    MGLMapView *_mapView;
}

- (void)viewDidLoad
{
    [super viewDidLoad];

    _mapView = [[MGLMapView alloc] initWithFrame:self.view.bounds];
    _mapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

    [self.view addSubview:_mapView];
}

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

- (void)tinyMapView
{
    _mapView.frame = CGRectMake(20, self.topLayoutGuide.length, self.view.frame.size.width / 2, self.view.frame.size.height / 2);
}

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

@end