diff --git a/platform/ios/INSTALL.md b/platform/ios/INSTALL.md index 777c0035b..5db1c865e 100644 --- a/platform/ios/INSTALL.md +++ b/platform/ios/INSTALL.md @@ -105,14 +105,28 @@ If your application targets iOS 7.x, you’ll need to install the static framewo 1. Mapbox vector tiles require a Mapbox account and API access token. In the project editor, select the application target. In the Info tab, set `MGLMapboxAccessToken` to your access token. You can obtain one from the [Mapbox account page](https://www.mapbox.com/studio/account/tokens/). -1. In a XIB or storyboard, add a Custom View and set its custom class to `MGLMapView`. If you need to manipulate the map view programmatically, import the `Mapbox` module (Swift) or `Mapbox.h` umbrella header (Objective-C). +1. In a XIB or storyboard, add a View and set its custom class to `MGLMapView`. If you need to manipulate the map view programmatically, import the `Mapbox` module (Swift) or `Mapbox.h` umbrella header (Objective-C), then connect the map view to a new outlet in your view controller class. The resulting outlet declaration should look something like: -## Use +```objc +// ViewController.m +#import -1. Mapbox vector tiles require a Mapbox account and API access token. In the project editor, select the application target. In the Info tab, set `MGLMapboxAccessToken` to your access token. You can obtain one from the [Mapbox account page](https://www.mapbox.com/studio/account/tokens/). +@interface ViewController : UIViewController -1. In a XIB or storyboard, add a View and set its custom class to `MGLMapView`. If you need to manipulate the map view programmatically, import the `Mapbox` module (Swift) or `Mapbox.h` umbrella header (Objective-C). +@property (strong) IBOutlet MGLMapView *mapView; -## Troubleshooting +@end +``` + +```swift +// ViewController.swift +import Mapbox + +class ViewController: UIViewController { + @IBOutlet var mapView: MGLMapView! +} +``` + +### Troubleshooting On OS X, you can also try clearing the Xcode cache with `make clear_xcode_cache`.