web-dev-qa-db-fra.com

Comment définir la taille d'un symbole SF dans SwiftUI?

Comment définir la taille d'un symbole SF dans Xcode 11 à l'aide de SwiftUI?

11
Ryan

Les symboles SF sont similaires aux polices, donc:

.font(.system(size: 60))
11
Ryan

Vous pouvez définir des poids et des tailles:

Image(systemName: "checkmark.circle")
    .font(.system(size: 16, weight: .ultraLight))
Image(systemName: "checkmark.circle")
    .font(.system(size: 16, weight: .thin))
Image(systemName: "checkmark.circle")
    .font(.system(size: 16, weight: .light))
Image(systemName: "checkmark.circle")
    .font(.system(size: 16, weight: .regular))
Image(systemName: "checkmark.circle")
    .font(.system(size: 16, weight: .medium))
Image(systemName: "checkmark.circle")
    .font(.system(size: 16, weight: .semibold))
Image(systemName: "checkmark.circle")
    .font(.system(size: 16, weight: .bold))
Image(systemName: "checkmark.circle")
    .font(.system(size: 16, weight: .heavy))
Image(systemName: "checkmark.circle")
    .font(.system(size: 16, weight: .black))
4
YRUsoDiao