---
title: tag
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsview/tag
---

# tag

The view’s tag, which is an integer that you use to identify the view within your app.

## Declaration

```swift
var tag: Int { get }
```

## Discussion

Discussion The default value of this property is –1. Subclasses can override this property to provide individual tags for views, possibly redefining the property as readwrite so that you can modify it more easily.

## See Also

### Identifying Views by Tag

- [viewWithTag(_:)](appkit/nsview/viewwithtag(_:).md)
