<!--
{
  "availability" : [
    "iOS: 27.3.0 -",
    "iPadOS: 27.3.0 -",
    "macCatalyst: 27.3.0 -",
    "macOS: 27.3.0 -",
    "tvOS: -",
    "visionOS: 27.3.0 -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "PhotosUI",
  "identifier" : "/documentation/PhotosUI/PHPickerAspectRatio-c.class/initWithAspectRatio:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "PhotosUI"
    ],
    "preciseIdentifier" : "c:objc(cs)PHPickerAspectRatio(im)initWithAspectRatio:"
  },
  "title" : "initWithAspectRatio:"
}
-->

# initWithAspectRatio:

Creates a custom aspect ratio (width / height).

```
- (instancetype) initWithAspectRatio:(CGFloat) aspectRatio;
```

## Parameters

`aspectRatio`

The ratio of an item’s width to its height. Must be greater than 0.

---

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)