Post

Replies

Boosts

Views

Activity

Comment on How can I integrate my own text changes into UITextView's undo manager?
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.
Topic: UI Frameworks SubTopic: UIKit Tags:
Jun ’23
Comment on Navigation bar of custom-presented navigation controller moving to app title bar in Catalyst on Ventura
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?
Topic: UI Frameworks SubTopic: UIKit Tags:
Oct ’22
Comment on How do I implement drop operation in UICollectionView drag and drop with an async data source and cell registration?
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?
Topic: UI Frameworks SubTopic: UIKit Tags:
Nov ’21
Comment on Swift Package Manager: Validation / "no such file"
What boilerplate??
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’23
Comment on Getting selected text from ImageAnalysisInteraction on UIImageView
This is now possible in iOS 17 with the selectedText property! https://developer.apple.com/documentation/visionkit/imageanalysisinteraction/4176689-selectedtext
Topic: Machine Learning & AI SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’23
Comment on How can I replicate CALayer.maskedCorners with UIButtonConfiguration and UIBackgroundConfiguration?
Done! FB12358266
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on How can I integrate my own text changes into UITextView's undo manager?
FB12292111
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on How can I integrate my own text changes into UITextView's undo manager?
Ignore this - it should have been a comment on the post above, but there's no button to delete a post.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on How can I integrate my own text changes into UITextView's undo manager?
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.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on Getting selected text from ImageAnalysisInteraction on UIImageView
No. I think it's just a hole in the API. I filed feedback FB10794147 about it.
Topic: Machine Learning & AI SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’23
Comment on How do I enable UILargeContentViewerInteraction on UITabBar outside of UITabBarController?
FB11855719. Thanks!
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Dec ’22
Comment on Navigation bar of custom-presented navigation controller moving to app title bar in Catalyst on Ventura
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?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on How can I use conditional code for a new OS version while building with the current SDK?
If you want Objective-C code to only be compiled if linking against the iOS 16 SDK: #ifdef __IPHONE_16_0 //...code here #endif
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’22
Comment on How can I choose what scene gets opened on iPad after all are closed?
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?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Mar ’22
Comment on How do I support the fast-scrolling scrubber using UICollectionViewDiffableDataSource?
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.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Nov ’21
Comment on Is the text color of UICollectionView index views modifiable?
Related feedback: FB9755148
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Nov ’21
Comment on How do I implement drop operation in UICollectionView drag and drop with an async data source and cell registration?
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?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Nov ’21
Comment on How do I implement drop operation in UICollectionView drag and drop with an async data source and cell registration?
So I would just duplicate my cell registration with a reuse identifier for this purpose?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Nov ’21