Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
joel-perry committed Sep 19, 2024
1 parent de14ce7 commit 88c69f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _posts/2023-02-11-dynamictypesize-uiview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ date: 2023-02-11 02:02:40 -0600
tags: [uikit]
---

When going from SwiftUI back to UIKit, I miss having certain view modifiers, such as`.dynamicTypeSize()`. In SwiftUI, we can limit the accessibility behavior of a View by setting a value or range of `DynamicTypeSize`. This approach is expressive and safe, since the compiler can check for valid ranges. To apply the same limits to UIView, we set single values of `UIContentSizeCategory` for `.minimumContentSizeCategory` and `.maximumContentSizeCategory`, which requires checking values by hand. The ability to set a range of sizes is very convenient, so let's bring this little piece of SwiftUI style to UIKit.
When going from SwiftUI back to UIKit, I miss having certain view modifiers, such as `.dynamicTypeSize()`. In SwiftUI, we can limit the accessibility behavior of a View by setting a value or range of `DynamicTypeSize`. This approach is expressive and safe, since the compiler can check for valid ranges. To apply the same limits to UIView, we set single values of `UIContentSizeCategory` for `.minimumContentSizeCategory` and `.maximumContentSizeCategory`, which requires checking values by hand. The ability to set a range of sizes is very convenient, so let's bring this little piece of SwiftUI style to UIKit.

### Swift Ranges and the Comparable Protocol
The various range types (`Range`, `ClosedRange`, etc.) all conform to the `RangeExpression` protocol, which requires the underlying values to conform to the `Comparable` protocol.
Expand Down

0 comments on commit 88c69f0

Please sign in to comment.