Post

Replies

Boosts

Views

Activity

Reply to Help please
ProgressView() was introduced to iOS14 but I don’t think that calling you’re own view struct that name is the problem. Try unchecking the Enable Results settings next to the run button. I find that this causes the problem with slow rendering and the Abort called messages, as it does say that it May reduce performance.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’20
Reply to Playgrounds aborts w/ Shape
I have found that on iPad turning off Enable Results will result in little to no aborts called and the code will run quicker. With the setting on, even if your code is correct (without mistakes or bugs), the complier throws errors and aborts are called.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’20
Reply to Custom alignment for multiple stacks
I believe using this results in the correct alignment. extension HorizontalAlignment { private struct CenterLine: AlignmentID { static func defaultValue(in context: ViewDimensions) -> CGFloat { context[HorizontalAlignment.center] } } static let centerLine = Self(CenterLine.self) } Needing to add this to the container VStack(alignment: .centerLine) { ... } and this to the views in the HStacks .alignmentGuide(.centerLine) { $0[.trailing] } // for text label on left .alignmentGuide(.centerLine) { $0[.leading] } // for control on right
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’20