Use:
.font(Font.footnote.weight(.bold))
Post
Replies
Boosts
Views
Activity
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. 😡
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!
Answer: https://stackoverflow.com/questions/71027541/how-to-define-a-generic-swiftui-view-that-can-accept-sectioned-fetch-results-for
It seems that the symbol in question is some kind of custom symbol. Not going to use it.
SwiftData is not ready for prime time until this gets addressed!