---
title: "size(forNumberOfPages:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uipagecontrol/size(fornumberofpages:)"
---

# size(forNumberOfPages:)

Returns the size the receiver’s bounds should be to accommodate the given number of pages.

## Declaration

```swift
func size(forNumberOfPages pageCount: Int) -> CGSize
```

## Parameters

- `pageCount`: The number of pages to fit in the receiver’s bounds.

## Return Value

Return Value The minimum size required to display dots for the page count.

## Discussion

Discussion Subclasses that customize the appearance of the page control can use this method to resize the page control when the page count changes.
