Post

Replies

Boosts

Views

Activity

Reply to How to make a scrollable multi-line Text
macOS 11.6, Xcode 13.0 (13A233), iOS 15 Looks fixed. Given: struct ContentView: View { let msg = "Make sure you file a bug report and be very precise with how YOU think it should work. The Apple developers really do pay attention to feedback when they roll out a completely new project like SwiftUI." <insert body here> ...    static var previews: some View {     ObjectImage()       .previewLayout(.fixed(width: 300, height: 300)) } For the following simple implementations, I get: var body: some View {   Text(msg)     .background(Color(.sRGB, white: 0.9))     .border(Color.red) } var body: some View {   VStack {     Text(msg)       .background(Color(.sRGB, white: 0.9))   }   .border(Color.red) } var body: some View {   ScrollView {     VStack {       Text(msg)         .background(Color(.sRGB, white: 0.9))     }     .border(Color.red)   }   .border(Color.purple) }
Nov ’21
Reply to SwiftUI Tutorial EditMode
@Jim+Dovey, thank you, that code worked like a charm... and a clear example of what EditMode and the binding does! @Hanse00, it's true that a big company like Apple gets things wrong, probably all the time. As for how you can still learn in spite of their shortcomings, I recommend trying the code sample from Jim+Dovey, it'll make you think a bit more than the tutorial does and it will solve the problem that this thread is about.
Aug ’20