SvenTiigi / WhatsNewKit

Showcase your awesome new app features 📱
https://sventiigi.github.io/WhatsNewKit/
MIT License
3.87k stars 190 forks source link

`AttributedString` example broken #84

Closed tillkruss closed 3 months ago

tillkruss commented 4 months ago

What happened?

This code: https://github.com/SvenTiigi/WhatsNewKit/blob/6157c77e8be9b3d2310bc680681b61a8d9e290ac/Example/Example/ExamplesView.swift#L162-L170

Does not build with iOS 17.x in a SwiftUI app:

Cannot infer contextual base in reference to member 'cyan'
Type 'AttributeContainer' has no member 'foregroundColor'

Is there a way to highlight a word using the latest version?

What are the steps to reproduce?

Build with iOS 17.x

What is the expected behavior?

It to build.

SvenTiigi commented 4 months ago

Hi @tillkruss,

the example application is building successfully with iOS 17.X with this action run.

If you are using the code snippet included in your issue description outside the example application of the WhatsNewKit you need to ensure that the following extension is included since this extension adds a foregroundColor static function on an AttributeContainer

https://github.com/SvenTiigi/WhatsNewKit/blob/6157c77e8be9b3d2310bc680681b61a8d9e290ac/Example/Example/ExamplesView.swift#L213-L227

SvenTiigi commented 3 months ago

Closing due inactivity. Please feel free to re-open the issue at any time.