From 710398b780cc05e961a9c58c18176af46bbd34be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Thu, 28 Jan 2016 23:38:21 -0800 Subject: [PATCH] [ios] Removed redundant usage section Also copied some further setup steps from the IB page on the project wiki. --- platform/ios/INSTALL.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) 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`.