2016-07-11 7 views
0

私はiOSアプリケーションを作成しています。下のバーをタップすると、設定オプションを削除したいので、閉じて終了するだけです。これを行う方法はありますか?設定を削除する

ありがとうございます!

+0

"(これだけ近いと出口が残ります)"、それを詳しく説明してください。 – Yatendra

+0

ここにいくつかの情報を入力する必要があります。どのボトムバーですか?終わりはどこにありますか?あなたはアプリのどの部分にいるのですか?あなたはスクリーンショットを持っていますか? – Fogmeister

+0

このページ(http://imgur.com/a/8Z4Yr)を見てください。最後の画像では、そのバーをタップすると下部に59 km/hのバーがあるスクリーンショットが表示されます上記の画像がポップアップします。「Instellingen」を押すと、次の画面がポップアップします。私は人々が設定にアクセスできないように "Instellingen"ボタンを削除したい。 –

答えて

1

必要なすべての変更がSKTNavigationManager.m内部で行われるべきである。

  1. あなたが前にアクションシート

から「設定」オプションを削除する必要があります。

- (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]; 
} 

以降:

- (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. 選択したボタンのアクションハンドラを変更します(新しいメニュー構造を反映)。後

    - (void)actionSheet:(SKTActionSheet *)actionSheet didSelectButtonAtIndex:(NSUInteger)index { 
    if (index == 0) { 
        if ([self currentNavigationState] == SKTNavigationStateCalculatingRoute) { 
         [self stopNavigationWithReason:SKTNavigationStopReasonUserQuit stopAudio:YES]; 
        } else { 
         //remove states that should't exist while settings view is 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; 
    } 
    

    ::前

(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; 
} 
関連する問題