<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ProposedViewSize/replacingUnspecifiedDimensions(by:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI16ProposedViewSizeV30replacingUnspecifiedDimensions2bySo6CGSizeVAG_tF"
  },
  "title" : "replacingUnspecifiedDimensions(by:)"
}
-->

# replacingUnspecifiedDimensions(by:)

Creates a new proposal that replaces unspecified dimensions in this
proposal with the corresponding dimension of the specified size.

```
func replacingUnspecifiedDimensions(by size: CGSize = CGSize(width: 10, height: 10)) -> CGSize
```

## Parameters

`size`

A set of concrete values to use for the size proposal
in place of any unspecified dimensions. The default value is `10`
for both dimensions.

## Return Value

A new, fully specified size proposal.

## Discussion

Use the default value to prevent a flexible view from disappearing
into a zero-sized frame, and ensure the unspecified value remains
visible during debugging.

---

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)