diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2015-05-27 12:51:30 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2015-05-27 12:51:30 -0700 |
commit | 86dd0e99bc210f2bdbcd0c4407ec1d7b6074b001 (patch) | |
tree | df156bafb0c6b78ad04013c3b4496511facb9cbe /include | |
parent | ceef4d38419aaa449f543824f7519355ecdf5c94 (diff) | |
download | qtlocation-mapboxgl-86dd0e99bc210f2bdbcd0c4407ec1d7b6074b001.tar.gz |
Defailablize init methods
If an OpenGL context couldn’t be created, there’s just no point to soldiering on. Things are going to fall apart pretty quickly anyways. Assert and be done with it.
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/ios/MGLMapView.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/mbgl/ios/MGLMapView.h b/include/mbgl/ios/MGLMapView.h index c7bb8cf1f8..0ccb8225bb 100644 --- a/include/mbgl/ios/MGLMapView.h +++ b/include/mbgl/ios/MGLMapView.h @@ -22,14 +22,14 @@ IB_DESIGNABLE /** Initializes and returns a newly allocated map view with the specified frame and the default style. * @param frame The frame for the view, measured in points. -* @return An initialized map view or `nil` if the map view couldn’t be created. */ +* @return An initialized map view. */ - (instancetype)initWithFrame:(CGRect)frame; - (instancetype)initWithFrame:(CGRect)frame accessToken:(NSString *)accessToken __attribute__((unavailable("Use -initWithFrame:. Set MGLMapboxAccessToken in the Info.plist or call +[MGLAccountManager setAccessToken:]."))); /** Initializes and returns a newly allocated map view with the specified frame and style URL. * @param frame The frame for the view, measured in points. * @param styleURL The map style URL to use. Can be either an HTTP/HTTPS URL or a Mapbox map ID style URL (`mapbox://<user.style>`). -* @return An initialized map view or `nil` if the map view couldn’t be created. */ +* @return An initialized map view. */ - (instancetype)initWithFrame:(CGRect)frame styleURL:(NSURL *)styleURL; - (instancetype)initWithFrame:(CGRect)frame accessToken:(NSString *)accessToken styleURL:(NSURL *)styleURL __attribute__((unavailable("Use -initWithFrame:styleURL:. Set MGLMapboxAccessToken in the Info.plist or call +[MGLAccountManager setAccessToken:]."))); |