---
title: "rowSize(forComponent:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uipickerview/rowsize(forcomponent:)"
---

# rowSize(forComponent:)

Returns the size of a row for a component.

## Declaration

```swift
func rowSize(forComponent component: Int) -> CGSize
```

## Parameters

- `component`: A zero-indexed number identifying a component.

## Return Value

Return Value The size of rows in the given component. This is generally the size required to display the largest string or view used as a row in the component.

## Discussion

Discussion A picker view fetches the value of this property by calling the pickerView(_:widthForComponent:) and pickerView(_:rowHeightForComponent:) delegate methods, and caches it. The default value is (0, 0).

## See Also

### Getting the dimensions of the picker view

- [numberOfComponents](uikit/uipickerview/numberofcomponents.md)
- [numberOfRows(inComponent:)](uikit/uipickerview/numberofrows(incomponent:).md)
