如何将 .italic() 应用于 .largeTitle 字体? [英] How to apply .italic() to .largeTitle Font?

查看:24
本文介绍了如何将 .italic() 应用于 .largeTitle 字体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

import SwiftUI
import PlaygroundSupport

struct ContentView: View {

    var body: some View {

        VStack {
            ForEach(Font.TextStyle.allCases, id: \.self) { style in
                Text(self.describe(style: style)).font(.system(style)).italic()
            }
        }
    }
    func describe(style: Font.TextStyle) -> String {
        var s: String = ""
        print(style, terminator: "", to: &s)
        return s
    }
}

PlaygroundPage.current.setLiveView(ContentView())

生产

这是一个错误还是我错过了什么?

is it a bug or I missed something?

推荐答案

Apple 的最终回答

Final answer from Apple

解决方案:调查完成 - 按当前设计工作

Resolution:Investigation complete - Works as currently designed

与 Apple 一起玩得开心......

Have a lot of fun with Apple ...

这篇关于如何将 .italic() 应用于 .largeTitle 字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆