You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to display a UITextView with a bulleted list paragraph style but when I add DTCoreText as a Cocoapod, the bullets disappear!
Before
After
After setting breakpoints on DTCoreText, I observed that the library is called while displaying my text view (note: I haven't used any DTCoreText objects anywhere). Here is the backtrace:
I know - (NSRange)rangeOfTextList:(DTCSSListStyle *)list atIndex:(NSUInteger)location is supposed to mimic AppKit's - (NSRange)rangeOfTextList:(NSTextList *)list atIndex:(NSUInteger)location but I can't tell if this calling behaviour is intentional or not. Either way, the logic of this method doesn't work as expected and breaks the bullets.
If unintentional, should this method be prefixed to avoid this collision? Or is there an alternative approach to resolve this issue?
Note: This only occurs on iOS 18. The method is still called on iOS 17 but doesn't seem to break bulleted lists.
Here is the example view controller I am using to trigger the scenario:
Yes, prefixing resolves the issue :) I've not contributed in the past—is there a preferred prefix to use and can you confirm that this name change would be ok, given it will be a breaking change for users who might be calling this API.
I'm trying to display a
UITextView
with a bulleted list paragraph style but when I addDTCoreText
as a Cocoapod, the bullets disappear!After setting breakpoints on
DTCoreText
, I observed that the library is called while displaying my text view (note: I haven't used anyDTCoreText
objects anywhere). Here is the backtrace:I know
- (NSRange)rangeOfTextList:(DTCSSListStyle *)list atIndex:(NSUInteger)location
is supposed to mimicAppKit
's- (NSRange)rangeOfTextList:(NSTextList *)list atIndex:(NSUInteger)location
but I can't tell if this calling behaviour is intentional or not. Either way, the logic of this method doesn't work as expected and breaks the bullets.If unintentional, should this method be prefixed to avoid this collision? Or is there an alternative approach to resolve this issue?
Note: This only occurs on iOS 18. The method is still called on iOS 17 but doesn't seem to break bulleted lists.
Here is the example view controller I am using to trigger the scenario:
The text was updated successfully, but these errors were encountered: