<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITabBarItem/init(title:image:selectedImage:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UITabBarItem(im)initWithTitle:image:selectedImage:"
  },
  "title" : "init(title:image:selectedImage:)"
}
-->

# init(title:image:selectedImage:)

Creates a tab bar item that toggles the image it displays when its selected state changes.

```
convenience init(title: String?, image: UIImage?, selectedImage: UIImage?)
```

## Parameters

`title`

The item’s title.

`image`

The item’s source image.

`selectedImage`

The source image the item uses when the user selects it.

## Discussion

Use `nil` for `title` or `image` if you don’t want to display that element.

If you don’t provide `selectedImage`, the item uses `image` for both selection states. The item creates the images it displays from the alpha values in the source images. To prevent system tinting, use images with the [`UIImage.RenderingMode.alwaysOriginal`](/documentation/UIKit/UIImage/RenderingMode-swift.enum/alwaysOriginal) rendering mode. The item clips any image that’s larger than its bounds.

---

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)