Files
MapLibreParticleLab/test/ios/MGLTViewController.m
Minh Nguyễn 5ffa52cab5 Automatically find view controller for layout guides
Find the managing view controller by traversing the responder chain.
2015-04-27 15:52:30 -07:00

31 lines
658 B
Objective-C

#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