Post

Replies

Boosts

Views

Activity

Reply to Proper way to customize layout fragments' frames?
I have the same issue about the paragraph spacing for the fragments. It looks like the NSParagraphStyle does not works for TextKit 2. Finally, I use a new subclass for NSTextLayoutFragment and override the bottomMargin to the spacing. extension TextAreaView: NSTextLayoutManagerDelegate {     func textLayoutManager(_ textLayoutManager: NSTextLayoutManager, textLayoutFragmentFor location: NSTextLocation, in textElement: NSTextElement) -> NSTextLayoutFragment {         let endTextLocation = textLayoutManager.documentRange.endLocation         if let elementRangeEndLocation = textElement.elementRange?.endLocation,            elementRangeEndLocation.compare(endTextLocation) == .orderedSame {             return NSTextLayoutFragment(textElement: textElement, range: textElement.elementRange)         } else {             return ParagraphTextLayoutFragment(textElement: textElement, range: textElement.elementRange)         }     } } Maybe we could add some view during surfacing drawing due to the NSTextLayoutFragment could be customized by subclassing. I'm working on adding a custom view inline. And still needs some efforts.
Topic: UI Frameworks SubTopic: General Tags:
Jul ’21
Reply to Modern Collection Views and Readable Content Guide
In your content view. Set AutoLayout to readable layout guide and make sure call: preservesSuperviewLayoutMargins = true
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jun ’21
Reply to The method updateContentSizeIfNeeded not set correct size
Just make a simple debugging for this. height = max(height, contentSize.height) is not required and should be removed from sample codes. Now the layout is the correct size.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to Proper way to customize layout fragments' frames?
I have the same issue about the paragraph spacing for the fragments. It looks like the NSParagraphStyle does not works for TextKit 2. Finally, I use a new subclass for NSTextLayoutFragment and override the bottomMargin to the spacing. extension TextAreaView: NSTextLayoutManagerDelegate {     func textLayoutManager(_ textLayoutManager: NSTextLayoutManager, textLayoutFragmentFor location: NSTextLocation, in textElement: NSTextElement) -> NSTextLayoutFragment {         let endTextLocation = textLayoutManager.documentRange.endLocation         if let elementRangeEndLocation = textElement.elementRange?.endLocation,            elementRangeEndLocation.compare(endTextLocation) == .orderedSame {             return NSTextLayoutFragment(textElement: textElement, range: textElement.elementRange)         } else {             return ParagraphTextLayoutFragment(textElement: textElement, range: textElement.elementRange)         }     } } Maybe we could add some view during surfacing drawing due to the NSTextLayoutFragment could be customized by subclassing. I'm working on adding a custom view inline. And still needs some efforts.
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to Can't add new version of app - An error occurred
Same issue. Cannot release new build. :(
Replies
Boosts
Views
Activity
Apr ’22