SvenTiigi / WhatsNewKit

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

Use text-icon instead of Image #88

Open LuegM opened 2 months ago

LuegM commented 2 months ago

Is it possible to initialize with a text (icon) instead of an image? I would want to use FontAwesome which i have integrated as font and would like to use like that:

Text("").font(.custom("FontAwesome6Duotone-Solid", size: size))

But how to use that here?

.init(
    image: .init(

    ),
    title: "",
    subtitle: ""
)
SvenTiigi commented 1 month ago

Hi @LuegM,

Yes! You can initialize a WhatsNew.Feature.Image with a custom view e.g. a Text with a custom font using the following initializer:

https://github.com/SvenTiigi/WhatsNewKit/blob/6157c77e8be9b3d2310bc680681b61a8d9e290ac/Sources/Models/WhatsNew%2BFeature%2BImage.swift#L17-L25