---
title: "MTGestureService | Mobile sdk | Mobile sdk ios | Ios"
description: "Service responsible for gesture handling and state."
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# MTGestureService

```
@MainActor
public class MTGestureService
```

Service responsible for gesture handling and state.

-   `[enabledGestures](#/s:11MapTilerSDK16MTGestureServiceC15enabledGesturesSDyAA0D4TypeOAA0D0_pGvp)`
    
    List of the enabled gestures on the map.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    public private(set) var enabledGestures: [MTGestureType : MTGesture] { get }
    ```
    
-   `[disableGesture(with:completionHandler:)](#/s:11MapTilerSDK16MTGestureServiceC14disableGesture4with17completionHandleryAA0D4TypeO_ys6ResultOyytAA7MTErrorOGcSgtF)`
    
    Removes the gesture with the provided type from the map.
    
    #### Declaration
    
    Swift
    
    ```
    @available(iOS, deprecated: 16.0, message: "Prefer the async version for modern concurrency handling")
    @MainActor
    public func disableGesture(with type: MTGestureType, completionHandler: ((Result<Void, MTError>) -> Void)? = nil)
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>type</em></code></td><td><div><p>type of gesture to disable.</p></div></td></tr><tr><td><code><em>completionHandler</em></code></td><td><div><p>A handler block to execute when function finishes.</p></div></td></tr></tbody></table>
    
-   `[enableDragPanGesture(options:completionHandler:)](#/s:11MapTilerSDK16MTGestureServiceC20enableDragPanGesture7options17completionHandleryAA06MTDragH7OptionsVSg_ys6ResultOyytAA7MTErrorOGcSgtF)`
    
    Enables drag to pan gesture.
    
    #### Declaration
    
    Swift
    
    ```
    @available(iOS, deprecated: 16.0, message: "Prefer the async version for modern concurrency handling")
    @MainActor
    public func enableDragPanGesture(
        options: MTDragPanOptions? = nil,
        completionHandler: ((Result<Void, MTError>) -> Void)? = nil
    )
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>options</em></code></td><td><div><p>Drag to pan options (optional).</p></div></td></tr><tr><td><code><em>completionHandler</em></code></td><td><div><p>A handler block to execute when function finishes.</p></div></td></tr></tbody></table>
    
-   `[enablePinchRotateAndZoomGesture(completionHandler:)](#/s:11MapTilerSDK16MTGestureServiceC31enablePinchRotateAndZoomGesture17completionHandleryys6ResultOyytAA7MTErrorOGcSg_tF)`
    
    Enables pinch to rotate and zoom gesture.
    
    #### Declaration
    
    Swift
    
    ```
    @available(iOS, deprecated: 16.0, message: "Prefer the async version for modern concurrency handling")
    @MainActor
    public func enablePinchRotateAndZoomGesture(completionHandler: ((Result<Void, MTError>) -> Void)? = nil)
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>completionHandler</em></code></td><td><div><p>A handler block to execute when function finishes.</p></div></td></tr></tbody></table>
    
-   `[enableTwoFingerDragPitchGesture(completionHandler:)](#/s:11MapTilerSDK16MTGestureServiceC31enableTwoFingerDragPitchGesture17completionHandleryys6ResultOyytAA7MTErrorOGcSg_tF)`
    
    Enables two fingers drag pitch gesture.
    
    #### Declaration
    
    Swift
    
    ```
    @available(iOS, deprecated: 16.0, message: "Prefer the async version for modern concurrency handling")
    @MainActor
    public func enableTwoFingerDragPitchGesture(completionHandler: ((Result<Void, MTError>) -> Void)? = nil)
    ```
    
-   `[enableDoubleTapZoomInGesture(completionHandler:)](#/s:11MapTilerSDK16MTGestureServiceC28enableDoubleTapZoomInGesture17completionHandleryys6ResultOyytAA7MTErrorOGcSg_tF)`
    
    Enables double tap zoom in gesture.
    
    #### Declaration
    
    Swift
    
    ```
    @available(iOS, deprecated: 16.0, message: "Prefer the async version for modern concurrency handling")
    @MainActor
    public func enableDoubleTapZoomInGesture(completionHandler: ((Result<Void, MTError>) -> Void)? = nil)
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>completionHandler</em></code></td><td><div><p>A handler block to execute when function finishes.</p></div></td></tr></tbody></table>
    
-   `[setDoubleTapSensitivity(_:)](#/s:11MapTilerSDK16MTGestureServiceC23setDoubleTapSensitivityyySdF)`
    
    Sets the double tap sensitivity level (i.e. required time between taps).
    
    Note
    
    Default: 0.4
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    public func setDoubleTapSensitivity(_ sensitivity: Double)
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>completionHandler</em></code></td><td><div><p>A handler block to execute when function finishes.</p></div></td></tr></tbody></table>
    
-   `[disableGesture(with:)](#/s:11MapTilerSDK16MTGestureServiceC14disableGesture4withyAA0D4TypeO_tYaF)` Asynchronous
    
    Removes the gesture with the provided type from the map.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    public func disableGesture(with type: MTGestureType) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>type</em></code></td><td><div><p>type of gesture to disable.</p></div></td></tr></tbody></table>
    
-   `[enableDragPanGesture(options:)](#/s:11MapTilerSDK16MTGestureServiceC20enableDragPanGesture7optionsyAA06MTDragH7OptionsVSg_tYaF)` Asynchronous
    
    Enables drag to pan gesture.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    public func enableDragPanGesture(options: MTDragPanOptions? = nil) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>options</em></code></td><td><div><p>Drag to pan options (optional).</p></div></td></tr></tbody></table>
    
-   `[enablePinchRotateAndZoomGesture()](#/s:11MapTilerSDK16MTGestureServiceC31enablePinchRotateAndZoomGestureyyYaF)` Asynchronous
    
    Enables pinch to rotate and zoom gesture.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    public func enablePinchRotateAndZoomGesture() async
    ```
    
-   `[enableTwoFingerDragPitchGesture()](#/s:11MapTilerSDK16MTGestureServiceC31enableTwoFingerDragPitchGestureyyYaF)` Asynchronous
    
    Enables two fingers drag pitch gesture.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    public func enableTwoFingerDragPitchGesture() async
    ```
    
-   `[enableDoubleTapZoomInGesture()](#/s:11MapTilerSDK16MTGestureServiceC28enableDoubleTapZoomInGestureyyYaF)` Asynchronous
    
    Enables double tap zoom in gesture.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    public func enableDoubleTapZoomInGesture() async
    ```
