ios - Remove settings -


i'm making ios app, , want remove settings option when tap bottom bar (so close , exit remain). there way this, , how?

thanks in advance!

all required changes made inside sktnavigationmanager.m:

  1. you need remove "settings" option action sheet

before:

- (void)mapview:(skmapview *)mapview didtapatcoordinate:(cllocationcoordinate2d)coordinate { sktactionsheet *sheet = nil; if ([self currentnavigationstate] == sktnavigationstatecalculatingroute) {     sheet = [sktactionsheet actionsheetwithbuttontitles:@[nslocalizedstring(ksktquitkey, nil)] cancelbuttontitle:nslocalizedstring(ksktcancelkey, nil)]; } else {     sheet = [sktactionsheet actionsheetwithbuttontitles:@[nslocalizedstring(ksktsettingskey, nil), nslocalizedstring(ksktquitkey, nil)] cancelbuttontitle:nslocalizedstring(ksktcancelkey, nil)]; }  sheet.delegate = self; _activeactionsheet = sheet; [sheet showinview:_mainview]; } 

after:

- (void)mapview:(skmapview *)mapview didtapatcoordinate:(cllocationcoordinate2d)coordinate { sktactionsheet *sheet = nil; if ([self currentnavigationstate] == sktnavigationstatecalculatingroute) {     sheet = [sktactionsheet actionsheetwithbuttontitles:@[nslocalizedstring(ksktquitkey, nil)] cancelbuttontitle:nslocalizedstring(ksktcancelkey, nil)]; } else {     sheet = [sktactionsheet actionsheetwithbuttontitles:@[ nslocalizedstring(ksktquitkey, nil)] cancelbuttontitle:nslocalizedstring(ksktcancelkey, nil)]; }  sheet.delegate = self; _activeactionsheet = sheet; [sheet showinview:_mainview]; } 
  1. change action handler selected buttons (reflecting new menu structure).

before:

- (void)actionsheet:(sktactionsheet *)actionsheet didselectbuttonatindex:(nsuinteger)index { if (index == 0) {     if ([self currentnavigationstate] == sktnavigationstatecalculatingroute) {         [self stopnavigationwithreason:sktnavigationstopreasonuserquit stopaudio:yes];     } else {         //remove states should't exist while settings view visible         [self removestate:sktnavigationstateblockroads];         [self removestate:sktnavigationstateoverview];         [self removestate:sktnavigationstaterouteinfo];          [self pushnavigationstateifnotpresent:sktnavigationstatesettings];     }      [actionsheet dismissinstantly];     self.mainview.settingsview.delegate = self; } else if (index == 1) {     if (self.isfreedrive) {         [self stopnavigationwithreason:sktnavigationstopreasonuserquit stopaudio:yes];     } else {         [self confirmstopnavigation];     }      [actionsheet dismiss]; }  _activeactionsheet = nil; } 

after:

(void)actionsheet:(sktactionsheet *)actionsheet didselectbuttonatindex:(nsuinteger)index { if (index == 0) {     if (self.isfreedrive) {         [self stopnavigationwithreason:sktnavigationstopreasonuserquit stopaudio:yes];     } else {         [self confirmstopnavigation];     }      [actionsheet dismiss]; }  _activeactionsheet = nil; } 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -