Post

Replies

Boosts

Views

Activity

Reply to popoverTip prevents tap recognition
After few hours of tries I failed to achieve that on iOS 26. The worst part is that if you tap on the button with a tip - it will animate user interaction, but will completely ignore button action. Will only hide the tip. That feels like a very bad UX when you're trying to point a user to an action. It would be better if it wouldn't even allow to interact with the button rather than look like a bug.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’25
Reply to Getting SwiftUI TextEditor's Selection Range
It's still using NSTextView inside. Here's a solution: import SwiftUI struct MyView: View { @State var myString = "Hello world" var body: some View { TextEditor(text: $myString) .onReceive(NotificationCenter.default.publisher(for: NSTextView.didChangeSelectionNotification), perform: { notification in if let textView = notification.object as? NSTextView { print(textView.selectedRange()) } }) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’24
Reply to popoverTip prevents tap recognition
After few hours of tries I failed to achieve that on iOS 26. The worst part is that if you tap on the button with a tip - it will animate user interaction, but will completely ignore button action. Will only hide the tip. That feels like a very bad UX when you're trying to point a user to an action. It would be better if it wouldn't even allow to interact with the button rather than look like a bug.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’25
Reply to Getting SwiftUI TextEditor's Selection Range
It's still using NSTextView inside. Here's a solution: import SwiftUI struct MyView: View { @State var myString = "Hello world" var body: some View { TextEditor(text: $myString) .onReceive(NotificationCenter.default.publisher(for: NSTextView.didChangeSelectionNotification), perform: { notification in if let textView = notification.object as? NSTextView { print(textView.selectedRange()) } }) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’24