---
title: "location(in:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitouch/location(in:)-8rd36"
---

# location(in:)

Returns the current location of the touch in the coordinate system of the given view.

## Declaration

```swift
func location(in view: UIView?) -> CGPoint
```

## Parameters

- `view`: The view object in whose coordinate system you want the touch located. A custom view that is handling the touch may specify self to get the touch location in its own coordinate system. Pass nil to get the touch location in the window’s coordinates.

## Mentioned in

Implementing coalesced touch support in an app

## Return Value

Return Value A point specifying the location of the receiver in view.

## Discussion

Discussion This method returns the current location of a UITouch object in the coordinate system of the specified view. Because the touch object might have been forwarded to a view from another view, this method performs any necessary conversion of the touch location to the coordinate system of the specified view.

## See Also

### Getting the location of a touch

- [previousLocation(in:)](uikit/uitouch/previouslocation(in:)-22sws.md)
- [view](uikit/uitouch/view.md)
- [window](uikit/uitouch/window.md)
- [majorRadius](uikit/uitouch/majorradius.md)
- [majorRadiusTolerance](uikit/uitouch/majorradiustolerance.md)
- [preciseLocation(in:)](uikit/uitouch/preciselocation(in:).md)
- [precisePreviousLocation(in:)](uikit/uitouch/precisepreviouslocation(in:).md)
