Post

Replies

Boosts

Views

Activity

Reply to How can I refactor a GeometryReader?
Value types in swift cannot be subclassed because they are not objects nor are they class types. You can try extending with the use of extensions but the internal behaviours of the components are private APIs except for what is already available as public APIs.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’22
Reply to Xcode 13.2.1 Preview
Notes The command below also works with 13.x.x https://developer.apple.com/documentation/xcode-release-notes/xcode-13_3-release-notes Xcode SwiftUI Previews may occasionally fail with an error message about a modified .hfile, such as “file Header.h has been modified since the module file Module.pcm was built: mtime changed.” (85938686) Workaround: Delete the Clang module cache by running the following command in Terminal: rm -rf "$TMPDIR/../C/clang/ModuleCache". Then try to preview the file again.
Feb ’22
Reply to why app crashes when I use localization and LocationButton in swiftui? I get this error:Thread 1: "Invalid parameter not satisfying: width && height"
Sounds like you're passing .infinity to a width and height parameter of a frame. it might be best to use a GeometryReady to get a width & height as the minWidth & minHeight and use .infinity as the maxWidth & maxHeight or just use an absolute w x h.
Replies
Boosts
Views
Activity
Feb ’22
Reply to How can I refactor a GeometryReader?
Value types in swift cannot be subclassed because they are not objects nor are they class types. You can try extending with the use of extensions but the internal behaviours of the components are private APIs except for what is already available as public APIs.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to Xcode 13.2.1 Preview
Notes The command below also works with 13.x.x https://developer.apple.com/documentation/xcode-release-notes/xcode-13_3-release-notes Xcode SwiftUI Previews may occasionally fail with an error message about a modified .hfile, such as “file Header.h has been modified since the module file Module.pcm was built: mtime changed.” (85938686) Workaround: Delete the Clang module cache by running the following command in Terminal: rm -rf "$TMPDIR/../C/clang/ModuleCache". Then try to preview the file again.
Replies
Boosts
Views
Activity
Feb ’22
Reply to How to move objects to the right side?
Confirm the base language of the project used for localization. This should happen automatically based on your computer's or mobile device's default language, the project's default or base localization language without you having to force it.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’22