The goal is for me to have a List section with a bold header and non-bold sub-header, which is something I couldn't figure out how to do. So I tried making the header with a Text view that contains text that is partially bold, and partially normal non-bold text.
I tried doing this with an NSAttributedString which works with a UILabel but it doesn't appear to work with swiftUI's Text object.
Im making the header like so:
Section(header: Text(docSection.formattedHeader)) {
...
where docSection.formattedHeader is an NSAttributedString that is half bold, half non-bold separated with a \n
however then I get the following error:
Initializer 'init(_:)' requires that 'NSAttributedString' conform to 'StringProtocol'
Is there anyway to achieve this?