Post

Replies

Boosts

Views

Activity

Comment on Computed property for Shape within the SwiftUI's views
It depends on how you want to abstract the shape (some Shape vs some View). If it's just the Shape you want to extract and conditionally apply, then using AnyShape is fine and won't introduce significant performance overhead. However, if you also want to customise other view properties or combine different views per condition, then using @ViewBuilder is recommended.
Topic: UI Frameworks SubTopic: SwiftUI
Jun ’25
Comment on textSelection does not work
I have just tried and you can select the text. If you mean you don't get the blue range grabbers, then that's the intended behaviour. Documentation: "These menu items operate on the entire contents of the Text view; the person can’t select a range of text like they can on macOS."
Topic: UI Frameworks SubTopic: SwiftUI
Jul ’25
Comment on How to create window without border between title bar and content view?
Can you please mark that answer as correct to close this thread and let others know your issue has been solved.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’23
Comment on WatchOS Battery Level in SwiftUI
Can you please mark that answer as correct to close this thread and let others know your issue has been solved.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’23
Comment on SwiftUI Orientation Change
That's great. I suggest you create a new post detailing your new issue as I don't have enough information here to fix it.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Comment on phaseAnimator: prevent opacity change?
I'm not really familiar with Live Activities, but I understand that you get a context that has some state and attributes passed from your main app. I'm assuming when this changes, that is your trigger.
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
May ’24
Comment on Computed property for Shape within the SwiftUI's views
It depends on how you want to abstract the shape (some Shape vs some View). If it's just the Shape you want to extract and conditionally apply, then using AnyShape is fine and won't introduce significant performance overhead. However, if you also want to customise other view properties or combine different views per condition, then using @ViewBuilder is recommended.
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Jun ’25
Comment on SWIFT UI - HTTP POST method sending as GET method
You need to make sure you set the Content-Type header like you do when using cURL: request.setValue("application/json", forHTTPHeaderField: "Content-Type").
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Jul ’25
Comment on textSelection does not work
I have just tried and you can select the text. If you mean you don't get the blue range grabbers, then that's the intended behaviour. Documentation: "These menu items operate on the entire contents of the Text view; the person can’t select a range of text like they can on macOS."
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Jul ’25