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

# init(frame:style:)

Creates and returns a table view with the specified frame and style.

```
init(frame: CGRect, style: UITableView.Style)
```

## Parameters

`frame`

A rectangle specifying the initial location and size of the table view in its superview’s coordinates. The frame of the table view changes as table cells are added and deleted.

`style`

A constant that specifies the style of the table view. For a list of valid styles, see [`UITableView.Style`](/documentation/UIKit/UITableView/Style-swift.enum).

## Return Value

Returns an initialized [`UITableView`](/documentation/UIKit/UITableView) object.

## Discussion

You must specify the style of a table view when you create it, and you can’t change that style later. If you initialize the table view with the [UIView](https://developer.apple.com/library/archive/releasenotes/iPhone/RN-iPhoneSDK/index.html#//apple_ref/doc/uid/TP40007428-CH1-SW18) method [`init(frame:)`](/documentation/UIKit/UIView/init(frame:)), the [`UITableView.Style.plain`](/documentation/UIKit/UITableView/Style-swift.enum/plain) style is used as a default.

---

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)