<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITextContentType",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@T@UITextContentType"
  },
  "title" : "UITextContentType"
}
-->

# UITextContentType

Constants that identify the semantic meaning for a text-entry area.

```
struct UITextContentType
```

## Overview

Use these constants with the [`textContentType`](/documentation/UIKit/UITextInputTraits/textContentType) property.

## Topics

### Defining web addresses

[`UITextContentTypeURL`](/documentation/UIKit/UITextContentType/URL)

A property that defines the content in a text input area as a URL.

### Identifying contacts

[`UITextContentTypeNamePrefix`](/documentation/UIKit/UITextContentType/namePrefix)

A property that defines the content in a text input area as a prefix or title, such as *Dr*.

[`UITextContentTypeName`](/documentation/UIKit/UITextContentType/name)

A property that defines the content in a text input area as a name.

[`UITextContentTypeNameSuffix`](/documentation/UIKit/UITextContentType/nameSuffix)

A property that defines the content in a text input area as a suffix, such as *Jr*.

[`UITextContentTypeGivenName`](/documentation/UIKit/UITextContentType/givenName)

A property that defines the content in a text input area as a first name.

[`UITextContentTypeMiddleName`](/documentation/UIKit/UITextContentType/middleName)

A property that defines the content in a text input area as a middle name.

[`UITextContentTypeFamilyName`](/documentation/UIKit/UITextContentType/familyName)

A property that defines the content in a text input area as a family name, or last name.

[`UITextContentTypeNickname`](/documentation/UIKit/UITextContentType/nickname)

A property that defines the content in a text input area as a nickname.

[`UITextContentTypeOrganizationName`](/documentation/UIKit/UITextContentType/organizationName)

A property that defines the content in a text input area as an organization name.

[`UITextContentTypeJobTitle`](/documentation/UIKit/UITextContentType/jobTitle)

A property that defines the content in a text input area as a job title.

### Setting location data

[`UITextContentTypeLocation`](/documentation/UIKit/UITextContentType/location)

A property that defines the content in a text input area as a location, such as a point of interest, an address, or another identifier for a location.

[`UITextContentTypeFullStreetAddress`](/documentation/UIKit/UITextContentType/fullStreetAddress)

A property that defines the content in a text input area as a street address that fully identifies a location.

[`UITextContentTypeStreetAddressLine1`](/documentation/UIKit/UITextContentType/streetAddressLine1)

A property that defines the content in a text input area as the first line of a street address.

[`UITextContentTypeStreetAddressLine2`](/documentation/UIKit/UITextContentType/streetAddressLine2)

A property that defines the content in a text input area as the second line of a street address.

[`UITextContentTypeAddressCity`](/documentation/UIKit/UITextContentType/addressCity)

A property that defines the content in a text input area as a city name.

[`UITextContentTypeAddressCityAndState`](/documentation/UIKit/UITextContentType/addressCityAndState)

A property that defines the content in a text input area as a city name with a state name.

[`UITextContentTypeAddressState`](/documentation/UIKit/UITextContentType/addressState)

A property that defines the content in a text input area as a state name.

[`UITextContentTypePostalCode`](/documentation/UIKit/UITextContentType/postalCode)

A property that defines the content in a text input area as a postal code.

[`UITextContentTypeSublocality`](/documentation/UIKit/UITextContentType/sublocality)

A property that defines the content in a text input area as a sublocality.

[`UITextContentTypeCountryName`](/documentation/UIKit/UITextContentType/countryName)

A property that defines the content in a text input area as a country or region name.

### Managing accounts

[`UITextContentTypeUsername`](/documentation/UIKit/UITextContentType/username)

A property that defines the content in a text input area as an account or login name.

[`UITextContentTypePassword`](/documentation/UIKit/UITextContentType/password)

A property that defines the content in a text input area as a password.

[`UITextContentTypeNewPassword`](/documentation/UIKit/UITextContentType/newPassword)

A property that defines the content in a text input area as a new password.

### Securing accounts

[`UITextContentTypeOneTimeCode`](/documentation/UIKit/UITextContentType/oneTimeCode)

A property that defines the content in a text input area as a one-time code.

### Setting communication details

[`UITextContentTypeEmailAddress`](/documentation/UIKit/UITextContentType/emailAddress)

A property that defines the content in a text input area as an email address.

[`UITextContentTypeTelephoneNumber`](/documentation/UIKit/UITextContentType/telephoneNumber)

A property that defines the content in a text input area as a telephone number.

[`UITextContentTypeCellularEID`](/documentation/UIKit/UITextContentType/cellularEID)

A property that defines the content in a text input area to contain an embedded identity document number for an eSIM.

[`UITextContentTypeCellularIMEI`](/documentation/UIKit/UITextContentType/cellularIMEI)

A property that defines the content in a text input area to contain an international mobile equipment identity number for an eSIM.

### Accepting payment

[`UITextContentTypeCreditCardNumber`](/documentation/UIKit/UITextContentType/creditCardNumber)

A property that defines the content in a text input area as a credit card number.

[`UITextContentTypeCreditCardExpiration`](/documentation/UIKit/UITextContentType/creditCardExpiration)

A property that defines the content in a text input area as an expiration date on a credit card.

[`UITextContentTypeCreditCardExpirationMonth`](/documentation/UIKit/UITextContentType/creditCardExpirationMonth)

A property that defines the content in a text input area as the month component of an expiration date on a credit card.

[`UITextContentTypeCreditCardExpirationYear`](/documentation/UIKit/UITextContentType/creditCardExpirationYear)

A property that defines the content in a text input area as the year component of an expiration date on a credit card.

[`UITextContentTypeCreditCardSecurityCode`](/documentation/UIKit/UITextContentType/creditCardSecurityCode)

A property that defines the content in a text input area as a credit card security code.

[`UITextContentTypeCreditCardType`](/documentation/UIKit/UITextContentType/creditCardType)

A property that defines the content in a text input area as a credit card type.

[`UITextContentTypeCreditCardName`](/documentation/UIKit/UITextContentType/creditCardName)

A property that defines the content in a text input area as a name on a credit card.

[`UITextContentTypeCreditCardGivenName`](/documentation/UIKit/UITextContentType/creditCardGivenName)

A property that defines the content in a text input area as a first name on a credit card.

[`UITextContentTypeCreditCardMiddleName`](/documentation/UIKit/UITextContentType/creditCardMiddleName)

A property that defines the content in a text input area as a middle name on a credit card.

[`UITextContentTypeCreditCardFamilyName`](/documentation/UIKit/UITextContentType/creditCardFamilyName)

A property that defines the content in a text input area as a family name, or last name, on a credit card.

### Getting birthday information

[`UITextContentTypeBirthdate`](/documentation/UIKit/UITextContentType/birthdate)

A property that defines the content in a text input area as a date of birth.

[`UITextContentTypeBirthdateDay`](/documentation/UIKit/UITextContentType/birthdateDay)

A property that defines the content in a text input area as the day component of a birthdate.

[`UITextContentTypeBirthdateMonth`](/documentation/UIKit/UITextContentType/birthdateMonth)

A property that defines the content in a text input area as the month component of a birthdate.

[`UITextContentTypeBirthdateYear`](/documentation/UIKit/UITextContentType/birthdateYear)

A property that defines the content in a text input area as the year component of a birthdate.

### Scheduling events

[`UITextContentTypeDateTime`](/documentation/UIKit/UITextContentType/dateTime)

A property that defines the content in a text input area as a date, time, or duration.

### Tracking events

[`UITextContentTypeFlightNumber`](/documentation/UIKit/UITextContentType/flightNumber)

A property that defines the content in a text input area as an airline flight number.

[`UITextContentTypeShipmentTrackingNumber`](/documentation/UIKit/UITextContentType/shipmentTrackingNumber)

A property that defines the content in a text input area as a parcel tracking number.

### Creating a text content type

[`init(rawValue:)`](/documentation/UIKit/UITextContentType/init(rawValue:))

Creates a text content type with the specified raw value.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Hashable`](/documentation/Swift/Hashable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

---

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)