Post not yet marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliesup-voted.tooltip
I have the same issue. I wonder, if sectionIdentifier and sortDescriptor have to be identical, how am I able to use only certain aspects of a field as sectionIdentifier?
Example 1: I have a model with a date field. I want to group/section by day. For that I created a computed property (with @objc so it's usabke as sectionIdentifier), that trims the date down to a String, representing the iso day of the date ("2022-10-25"). This isn't usable inside sortDescriptor. There I have to use the correct attribute, and then the app crashes.
Example 2: Having a title: String, wanting to group/section by first letter. Again I needed an @objc calculated property @objc var firstLetterOfTitle: String, and using \.title in sortDescriptors. Crash as soon as you change sort order.
Any ideas?