Verify that the ornaments hug the `MGLMapView` when it’s smaller than the view controller’s root view.
27 lines
644 B
Objective-C
27 lines
644 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.viewControllerForLayoutGuides = self;
|
|
_mapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
|
|
|
[self.view addSubview:_mapView];
|
|
}
|
|
|
|
- (void)insetMapView
|
|
{
|
|
_mapView.frame = CGRectInset(_mapView.frame, 50, 50);
|
|
}
|
|
|
|
@end
|