Thanks! Glad to hear it's under consideration.For the record, I actually got the solution from someone in the Catalyst channel of the AppKit Abusers Slack workspace.
Post
Replies
Boosts
Views
Activity
So I would just duplicate my cell registration with a reuse identifier for this purpose?
Ok I set up reuse identifiers and tried a placeholder:
id<UICollectionViewDropPlaceholderContext> context = [coordinator dropItem:coordinator.items.firstObject.dragItem toPlaceholder:placeholder];
And I get an exception when calling dropItem:toPlaceholder::
'NSInternalInconsistencyException', reason: 'UICollectionView must be updated via the UICollectionViewDiffableDataSource APIs when acting as the UICollectionView's dataSource: please do not call mutation APIs directly on UICollectionView. <UICollectionView: 0x108972000; frame = (0 152.5; 375 514.5); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x281c55830>; layer = <CALayer: 0x28125c760>; contentOffset: {0, 0}; contentSize: {375, 12814}; adjustedContentInset: {0, 0, 0, 0}; layout: <UICollectionViewCompositionalLayout: 0x107d727b0>; dataSource: <__UIDiffableDataSource 0x282dea850: sectionCounts=[_UIDataSourceSnapshotter - 0x2813e2fa0:(0:215)]; sections=[0x28129d7c0]; identifiers=[0x28129d3a0]>>'
So UICollectionViewPlaceholder can't be used with diffable data sources?
Related feedback: FB9755148
This works to make the index titles show up, but I seemingly have no way to reload the index titles when my data changes other than reloadData, which defeats a large part of the purpose of using a diffable data source. See FB9755148 - add reloadSectionIndexTitles to UICollectionView.
Interestingly, this works in the simulator if the second launch (the fourth step above) is via tapping the icon on the Home Screen, but not if it's by building and running in Xcode. Is this expected, or should I file a feedback?
If you want Objective-C code to only be compiled if linking against the iOS 16 SDK:
#ifdef __IPHONE_16_0
//...code here
#endif
Setting this property prevents the contents of the navigation bar moving to the toolbar, but the toolbar still grows in height when I custom-present a view controller, and doesn't shrink back to normal height when the presented view controller disappears. The expanded toolbar covers content that I had previously pinned to the top safe area, until I recreate those safe area constraints. Is this expected, or should I file a Feedback?
FB11855719. Thanks!
No. I think it's just a hole in the API. I filed feedback FB10794147 about it.
Hello! Thanks for the reply. Just using insertText doesn't quite work for me, because I need to insert attributed strings.
My full use case is implementing bulleted lists without using NSTextList (because I have to support older OS versions), and selecting multiple lines and doing things like changing the indent level or removing list styling. The user taps one button and I have to add/remove/change list prefixes and change paragraph style attributes, and I want that to be undoable in one step.
Ignore this - it should have been a comment on the post above, but there's no button to delete a post.
FB12292111
Done! FB12358266
This is now possible in iOS 17 with the selectedText property! https://developer.apple.com/documentation/visionkit/imageanalysisinteraction/4176689-selectedtext