Swift and iOS dev with Igor
The ride of the iOS developer

SwiftUI: Expandable TextField

SerialCoder.dev talks about a “present from the fourth revision of SwiftUI (iOS 16 and macOS 13 (Ventura))” to create an expandable and scrollable text field and adjust the displayed number of lines. The only downside is a lack of backwards compatibility.

I often forget that lineLimit() modifier also works with ClosedRange, PartialRangeThrough, and PartialRangeFrom ranges and has an overload with reservesSpace parameter.

Published on: May 7, 2023
Tagged with: