<!--
{
  "documentType" : "article",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/handling-touches-in-your-view",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Handling touches in your view"
}
-->

# Handling touches in your view

Use touch events directly on a view subclass if touch handling is intricately linked to the view’s content.

## Discussion

If you don’t plan to use gesture recognizers with a custom view, you can handle touch events directly from the view itself. Because views are responders, they can handle Multi-Touch events and many other types of events. When UIKit determines that a touch event occurred in a view, it calls the view’s [`touchesBegan(_:with:)`](/documentation/UIKit/UIResponder/touchesBegan(_:with:)), [`touchesMoved(_:with:)`](/documentation/UIKit/UIResponder/touchesMoved(_:with:)), or [`touchesEnded(_:with:)`](/documentation/UIKit/UIResponder/touchesEnded(_:with:)) method. You can override these methods in your custom views and use them to provide a response to touch events.

The methods you override in your views (or in any responder) to handle touches correspond to different phases of the touch event-handling process. For example, the following image illustrates the different phases of a touch event. When a finger (or Apple Pencil) touches the screen, UIKit creates a [`UITouch`](/documentation/UIKit/UITouch) object, sets the touch location to the appropriate point, and sets its [`phase`](/documentation/UIKit/UITouch/phase-swift.property) property to [`UITouch.Phase.began`](/documentation/UIKit/UITouch/Phase-swift.enum/began). When the same finger moves around the screen, UIKit updates the touch location and changes the [`phase`](/documentation/UIKit/UITouch/phase-swift.property) property of the touch object to [`UITouch.Phase.moved`](/documentation/UIKit/UITouch/Phase-swift.enum/moved). When the user lifts the finger from the screen, UIKit changes the [`phase`](/documentation/UIKit/UITouch/phase-swift.property) property to [`UITouch.Phase.ended`](/documentation/UIKit/UITouch/Phase-swift.enum/ended) and the touch sequence ends.

![A touch begins when the user’s finger touches the screen. The system updates the touch when the user’s finger moves or the touch parameters change. The touch ends when the user lifts the same finger from the screen. If an interruption such as an incoming call occurs, the system cancels any active touches.](images/com.apple.uikit/media-3004382@2x.png)

Similarly, the system may cancel an ongoing touch sequence at any time; for example, when an incoming phone call interrupts the app. When it does, UIKit notifies your view by calling the [`touchesCancelled(_:with:)`](/documentation/UIKit/UIResponder/touchesCancelled(_:with:)) method. You use that method to perform any needed cleanup of your view’s data structures.

UIKit creates a new [`UITouch`](/documentation/UIKit/UITouch) object for each new finger that touches the screen. The touches themselves are delivered with the current [`UIEvent`](/documentation/UIKit/UIEvent) object. UIKit distinguishes between touches originating from a finger and from Apple Pencil, and you can treat each of them differently.

> Important:
> In its default configuration, a view receives only the first ``doc://com.apple.uikit/documentation/UIKit/UITouch`` object associated with an event, even if more than one finger is touching the view. To receive the additional touches, you must set the view’s ``doc://com.apple.uikit/documentation/UIKit/UIView/isMultipleTouchEnabled`` property to true. You can also configure this property in Interface Builder using the Attributes inspector.

## Topics

### Advanced touch handling

[Implementing a Multi-Touch app](/documentation/UIKit/implementing-a-multi-touch-app)

Learn how to create a simple app that handles multitouch input.

[Getting high-fidelity input with coalesced touches](/documentation/UIKit/getting-high-fidelity-input-with-coalesced-touches)

Learn how to support high-precision touches in your app.

[Minimizing latency with predicted touches](/documentation/UIKit/minimizing-latency-with-predicted-touches)

Create a smooth and responsive drawing experience using UIKit’s predictions for touch locations.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)