SwiftData is not ready for prime time until this gets addressed!
Post
Replies
Boosts
Views
Activity
It seems that the symbol in question is some kind of custom symbol. Not going to use it.
Answer: https://stackoverflow.com/questions/71027541/how-to-define-a-generic-swiftui-view-that-can-accept-sectioned-fetch-results-for
I tried Nankea's solution, but it doesn't work for SwiftUI's View:
public protocol ViewExtension: View { }
extension View: ViewExtension { } // I don't know why this doesn't have to be public!
public extension ViewExtension {
/// Places an alphabetical index next to the view.
/// - Parameter style: A style to apply to the index.
/// - Returns: The view with the added index.
public func alphabeticalIndex(style: AlphabeticalIndexStyle = AlphabeticalIndexStyle.default) -> some View {
self.modifier(AlphabeticalIndex(style: style))
}
}
I get "Extension of protocol 'View' cannot have an inheritance clause" on the second line.
This REALLY needs to be fixed!
Apple's interface here is awful. All that is necessary is to add a start date. Why can't they add it?????? It would make developers' lives so much easier. 😡
Use:
.font(Font.footnote.weight(.bold))