Post

Replies

Boosts

Views

Activity

Reply to UIDeferredMenuElement With Uncached Provider Not Working on Mac Catalyst. Uncached provider block never called and menu displays as "Loading"
Still not fixed in Ventura 13.3. Can you show your code so I can see what's different from mine? I tried using it with a UIButton instead of UIBarButtonItem and then adding it to my NSToolbar with NSUIViewToolbarItem but still not working. The menu just shows a "Loading..." item and the uncached provider block is never called.
Topic: UI Frameworks SubTopic: UIKit Tags:
Apr ’23
Reply to Crash on iOS 16.2: -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:
Yes I was able to resolve it. So in my case I have a dedicated object as the UITableViewDataSource that sits between the UIViewController and the UITableView. The object that I use as the table view data source implements everything needed to populate the table view data, refreshing it automatically on model changes, etc. The only thing my table view data source doesn't do was provide a UITableView cell in -tableView:cellForRowAtIndexPath: method (instead it asks its delegate for the cell, which is the UIViewController) . My data source object is sort of like UITableViewDiffableDataSource in this way. So what was happening is the UITableView AND the table view data source objects were occasionally outliving the UIViewController. Then when a model change notification is posted my datasource object asked the view controller for the cell in -tableView:cellForRowAtIndexPath: (but the view controller was already deallocated). Never was able to reproduce it in debug mode. I removed the delegate-protocol from my data source object and captured the cell creation code in a block property and I haven't had a crash since.
Topic: UI Frameworks SubTopic: UIKit Tags:
Apr ’23
Reply to Mac Catalyst: UITableView Suddenly Randomly Selecting Rows After Deleting Row Via Swipe Action After a Bit of A Delay
So I attempted to workaround the issue by disabling table view focus just before doing the swipe delete action...then enabling it again after a bit of a delay in -tableView:didEndEditingRowAtIndexPath: And that avoids the auto selecting, assuming I do it after a long enough delay since the focus system must be queuing all this up on timers. But if you click outside the window, then reactivate the window, the focus system just selects the first row automatically in the table view after focus is reenabled. I could suppress it by returning NO from -tableView:shouldHighlightRowAtIndexPath: or canFocusOnItemAtIndexPath: but there is no good way to determine when I should suppress the selection to workaround this issue. Anyone know a way to tame the focus system? Can I clear its queue? A method like -cancelQueuedFocusSystemUpdateRequestsTakeItEasyPlease ?
Topic: UI Frameworks SubTopic: UIKit Tags:
Feb ’23
Reply to UIDeferredMenuElement With Uncached Provider Not Working on Mac Catalyst. Uncached provider block never called and menu displays as "Loading"
Still not fixed in Ventura 13.3. Can you show your code so I can see what's different from mine? I tried using it with a UIButton instead of UIBarButtonItem and then adding it to my NSToolbar with NSUIViewToolbarItem but still not working. The menu just shows a "Loading..." item and the uncached provider block is never called.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to Crash on iOS 16.2: -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:
Yes I was able to resolve it. So in my case I have a dedicated object as the UITableViewDataSource that sits between the UIViewController and the UITableView. The object that I use as the table view data source implements everything needed to populate the table view data, refreshing it automatically on model changes, etc. The only thing my table view data source doesn't do was provide a UITableView cell in -tableView:cellForRowAtIndexPath: method (instead it asks its delegate for the cell, which is the UIViewController) . My data source object is sort of like UITableViewDiffableDataSource in this way. So what was happening is the UITableView AND the table view data source objects were occasionally outliving the UIViewController. Then when a model change notification is posted my datasource object asked the view controller for the cell in -tableView:cellForRowAtIndexPath: (but the view controller was already deallocated). Never was able to reproduce it in debug mode. I removed the delegate-protocol from my data source object and captured the cell creation code in a block property and I haven't had a crash since.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to Mac Catalyst Copying NSURLs to the pasteboard translation is bad?
Also noticed copying multiple links to the pasteboard does not work on Mac Catalyst. [UIPasteboard generalPasteboard].URLs = @[appleDotComURL,websiteTwoURL,websiteThreeURL]; On iOS when I do that I can open "Notes" and paste and the strings for all three urls paste properly. But doing the same thing on Mac Catalyst it just pastes one url string...
Replies
Boosts
Views
Activity
Feb ’23
Reply to Mac Catalyst: UITableView Suddenly Randomly Selecting Rows After Deleting Row Via Swipe Action After a Bit of A Delay
So I attempted to workaround the issue by disabling table view focus just before doing the swipe delete action...then enabling it again after a bit of a delay in -tableView:didEndEditingRowAtIndexPath: And that avoids the auto selecting, assuming I do it after a long enough delay since the focus system must be queuing all this up on timers. But if you click outside the window, then reactivate the window, the focus system just selects the first row automatically in the table view after focus is reenabled. I could suppress it by returning NO from -tableView:shouldHighlightRowAtIndexPath: or canFocusOnItemAtIndexPath: but there is no good way to determine when I should suppress the selection to workaround this issue. Anyone know a way to tame the focus system? Can I clear its queue? A method like -cancelQueuedFocusSystemUpdateRequestsTakeItEasyPlease ?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Feb ’23