---
title: "contentRect(forBounds:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uibutton/contentrect(forbounds:)"
---

# contentRect(forBounds:)

Returns the rectangle in which the receiver draws its entire content.

## Declaration

```swift
func contentRect(forBounds bounds: CGRect) -> CGRect
```

## Parameters

- `bounds`: The bounding rectangle for the receiver.

## Return Value

Return Value The rectangle in which the receiver draws its entire content.

## Discussion

Discussion The content rectangle is the area needed to display the image and title including any padding and adjustments for alignment and other settings.

## See Also

### Related Documentation

- [contentEdgeInsets](uikit/uibutton/contentedgeinsets.md)

### Dimensions

- [backgroundRect(forBounds:)](uikit/uibutton/backgroundrect(forbounds:).md)
- [titleRect(forContentRect:)](uikit/uibutton/titlerect(forcontentrect:).md)
- [imageRect(forContentRect:)](uikit/uibutton/imagerect(forcontentrect:).md)
