Post

Replies

Boosts

Views

Activity

Reply to Getting precise text position with Swift for MacOS
Could you describe your use case more in detail ? Is it the text from your app, or any text (like a Finder file name) that may appear on screen ? If the former, is it a NSTextField ? Do you know which window it is in ? And then, with the window position you should be able to compute text position. If the latter, text may just be an image, for OCR may be the best way to go. But effectively may be slow.
Jan ’25
Reply to How to suppress the prohibition mark (🚫) in UITableView drag-and-drop operations?
I just added these 2 func (that allow to delete row). No more prohibition mark. func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) { if editingStyle == .delete { // Delete the row from the data source tableView.deleteRows(at: [indexPath], with: .fade) } else if editingStyle == .insert { // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view } } func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) { }
Topic: UI Frameworks SubTopic: UIKit Tags:
Jan ’25
Reply to Getting precise text position with Swift for MacOS
Could you describe your use case more in detail ? Is it the text from your app, or any text (like a Finder file name) that may appear on screen ? If the former, is it a NSTextField ? Do you know which window it is in ? And then, with the window position you should be able to compute text position. If the latter, text may just be an image, for OCR may be the best way to go. But effectively may be slow.
Replies
Boosts
Views
Activity
Jan ’25
Reply to Text Fields Covered By Keyboard. iPadOS App
Is it SwiftUI or UIKit ? For UIKit, use keyboadWillShow and keyboradWillHide to compute whether you have to move the view up. For SwiftUI, you have to manage yourself: https://stackoverflow.com/questions/56491881/move-textfield-up-when-the-keyboard-has-appeared-in-swiftui
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to backgroundPreferenceValue does not work after distributed through App Connect
You don't provide really useful information.   and found out it broke. Does it crash ? Do you get a crashlog ? What do you get ? What did you expect ?   What iOS versions on simulator ? On your device ? What versions "break" in TestFlight ? Is it SwiftUI ? You should also post the relevant part of code.
Replies
Boosts
Views
Activity
Jan ’25
Reply to How to suppress the prohibition mark (🚫) in UITableView drag-and-drop operations?
I just added these 2 func (that allow to delete row). No more prohibition mark. func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) { if editingStyle == .delete { // Delete the row from the data source tableView.deleteRows(at: [indexPath], with: .fade) } else if editingStyle == .insert { // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view } } func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) { }
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jan ’25