I've got a collectionList section that has some items that can be expanded, but they need to be done so lazily when the user taps them. (The children of these objects can only be retrieved asynchronously.)
I've given these expandable rows an "outline" disclosure indicator but when the row is tapped neither shouldExpandItem nor snapshotForExpandingParent is being invoked on the sectionSnapshotHandlers of the DataSource.
I notice there's no sample code for this and I'm curious if there's a particular way I need to configure the items in the original section snapshot to enable their expansion.
Post
Replies
Boosts
Views
Activity
I've got an asynchronous validation method that validates the underlying model of a cell when the cell is displayed on screen. When the validation completes, I modify the cell accessories to include an additional button that can be tapped for error details.
This validation is invoked within a UICollectionView.CellRegistration.
It seems that modifying the cell-accessories after the cell has returned (via the async completion handler) does not trigger a view update of said cell.
Should it? Or is it better for me to persist this information in the model object and trigger a the snapshot update?
I'm trying to implement row reordering with the new reorderingHandlers. Some of the items in my CollectionView-OutlineView can only be dropped to certain destinations.
I'm attempting to implement targetIndexPathForMoveFromItemAt to provide correct destination IndexPaths.
I'm observing that the originalIndexPath for an item that's being reordered appears to change during the life of the drag in an outline view.
It almost seems that originalIndexPath follows the value of the proposedIndexPath during the life of the drag.
This makes it difficult to determine valid drop locations for different types of items in the outline view.
Example output of originalIndexPath and proposedIndexPath (without letting go and letting the move proceed)
PROPOSE MOVING SOURCE AT: [3, 1] TO [[3, 1]]
PROPOSE MOVING SOURCE AT: [3, 1] TO [[3, 0]]
PROPOSE MOVING SOURCE AT: [3, 0] TO [[3, 1]]
PROPOSE MOVING SOURCE AT: [3, 1] TO [[3, 0]]
PROPOSE MOVING SOURCE AT: [3, 0] TO [[3, 0]]
I expect the proposedIndexPath to change as I move through the list, but the originalIndexpath changing surprised me.
Do these new collectionViews support reorderable sections?
That could save me from having to display an “edit sections” popover.
When quitting my catalyst application via the dock icon (right click -> quit) my SceneDelegate's stateRestorationActivity(for scene: UIScene) method is called and I return a non-nil NSUserActivity.
However, when restarting my application there is no user activity in the connectionOptions of scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions)
Does this function correctly for anyone else? Do I need to build my UserActivity in a specific way for this to work in Catalyst? It functions correctly when running on iOS.
I am trying to use a drag delegate and drop delegate to rearrange rows in a UITableView. This is instead of using the edit-mode and move-handles that invoke the the moveRowAt of UITableViewDataSource.
The use of the drag delegate and drop delegate to accomplish this works great when running on iOS, but not on mac running via Catalyst.
What I see:
tableView(_ tableView: UITableView, itemsForBeginning session: UIDragSession, at indexPath: IndexPath)
is called.
tableView(_ tableView: UITableView, canHandle session: UIDropSession) -> Bool
is not called.
I'm not sure what else I can do to make the UITableView happy if this functionality already works on iOS.
The tableview is configured like:
tableView.dragDelegate = self
tableView.dropDelegate = self
tableView.dragInteractionEnabled = true
This is my final blocker before releasing a catalyst app for 10.15, and I would like to get it resolved before 10.16.
FB7737498 is filed to capture this behavior and has a sample project attached.
If there is an acceptable project host for the new forum, I can attach it here as well.
I have a parent view that conditionally contains a subview that contains a grid of buttons. I'd like the buttons to each transition in a unique way when the grid appears. I'm able to get the grid container to transition in from the side, but any transition I use on the grand-child buttons is not respected.
I've got a few quetsions about designing an acceptable user experience involving migrating from legacy Core Data store to a CloudKit+CoreData store.Given the user can have a legacy data store on all of their devices and only one of those sets of data will be considered supreme, I need a means to effectively merge all this data in a non-destructive way.1) Does NSPersistentCloudKitContainer provide a means of opting into or out of CLoudKit storage for the user? Is it fully reliant on the user going into settings and flipping the iCloud-Data switch? Or can I maintain a local app settings flag? Can I tell a NSPersistentCloudKitContainer to no longer sync during it's lifecycle? 2)
So, am I going crazy or are these fundamentals missing from Catalyst?Is there a means to make a UIButton in a UIView get styled to look like a default rounded macOS button? Even choosing style "system" does not seem to adapt to mac.Is there a way to have a dropdown ToolbarItem, or is it only single button UIBarButtonItems?
Trying to add an `NSSharingServicePickerToolbarItem` to the NStoolbar of my scene's window, but when I set the `NSSharingServicePickerToolbarItem`'s activityItemsConfiguration to a class that implements `UIActivityItemsConfigurationReading` I get -[MYAPP.MYCLASS _uinsApplicationActivityProxies]: unrecognized selector sent to instance 0x6000026331e0I'm not exactly sure how I can satisfy this unrecognized selector given it appears to be for a private method. Thoughts?
Hey All,Been digging around the internet looking for this one, and while stackoverflow has some relevant solutions, none are working for me.My View Hierarchy is the followingView--->UISplitViewController.view ( set as a child viewController )--------> rootViewController.view (set as the mainViewController of the splitView)--------> detailViewController.view (set as the detailViewController of the splitview)Via the iPhone 6 simulator(split view is always collapsed) I present a modal viewcontroller with the following code: UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
[navigationController.navigationBar setBarStyle:UIBarStyleBlack];
[navigationController setModalPresentationStyle:UIModalPresentationPopover];
navigationController.popoverPresentationController.sourceView = view;
navigationController.popoverPresentationController.barButtonItem = barButtonItem;
navigationController.popoverPresentationController.delegate = self;
[self presentViewController:nav animated:YES completion:nil];I dissmiss the presented controller from that viewController by calling:[self dismissViewControllerAnimated:true completion:nil];If I set animated to "false" I dont have any problems, but it looks bad and doesnt make sense.I see some posts regarding this and custom presenatation methods, but Im not using anything custom here.Any Help is appreciated!EDIT:On iPhone the ModalPresentationStyle should default to UIModalPresentationOverFullScreen, so I tried setting the presentationStyle directly to that, and it worked!If I set the presentationStyle to "FullScreen" I get the same behavior, a black screen after dismissing.