Skip to content

Commit 27f916a

Browse files
authored
Merge pull request #364 from felixkrautschuk/fix-ios-deprecated-api
fixed deprecated 'utils.ios.getter' calls
2 parents eab82b4 + 31b4dcf commit 27f916a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/mapbox.ios.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ export class Mapbox extends MapboxCommon implements MapboxApi {
884884
this._mapboxViewInstance.removeFromSuperview();
885885
}
886886

887-
const view = utils.ios.getter( UIApplication, UIApplication.sharedApplication ).keyWindow.rootViewController.view,
887+
const view = UIApplication.sharedApplication.keyWindow.rootViewController.view,
888888
frameRect = view.frame,
889889
mapFrame = CGRectMake(
890890
settings.margins.left,
@@ -940,7 +940,7 @@ export class Mapbox extends MapboxCommon implements MapboxApi {
940940
return new Promise((resolve, reject) => {
941941
try {
942942
if ( this._mapboxViewInstance ) {
943-
let view = utils.ios.getter(UIApplication, UIApplication.sharedApplication).keyWindow.rootViewController.view;
943+
let view = UIApplication.sharedApplication.keyWindow.rootViewController.view;
944944
view.addSubview( this._mapboxViewInstance);
945945
resolve();
946946
} else {
@@ -2953,8 +2953,8 @@ export class Mapbox extends MapboxCommon implements MapboxApi {
29532953
}
29542954

29552955
const _addObserver = (eventName, callback) => {
2956-
return utils.ios.getter(NSNotificationCenter, NSNotificationCenter.defaultCenter).addObserverForNameObjectQueueUsingBlock(
2957-
eventName, null, utils.ios.getter(NSOperationQueue, NSOperationQueue.mainQueue), callback);
2956+
return NSNotificationCenter.defaultCenter.addObserverForNameObjectQueueUsingBlock(
2957+
eventName, null, NSOperationQueue.mainQueue, callback);
29582958
};
29592959

29602960
const _downloadImage = marker => {

0 commit comments

Comments
 (0)