014_swiftui_Text相关属性

在前面的课程。。我们已经大概的了解到了swiftUi课程的简单。。下面就是更精致的教程

效果

代码

//
//  ContentView.swift
//  learn_swiftUi
//
//  Created by liuan on 2020/5/14.
//  Copyright © 2020 liuan. All rights reserved.
//

import SwiftUI

struct ContentView: View {
    var body: some View {
//        VStack最多容纳10个视图
        VStack{
            Text("Hello, World!")
                .bold()
            
            Text("Hello ,world!")
                .italic()
            
            Text("Hello ,world!")
                .underline()
            
            Text("Hello ,world!")
                .underline(true,color: .orange)
//            删除线
            Text("Hello ,world!")
                .strikethrough()
            
            Text("Hello ,w

猜你喜欢

转载自blog.csdn.net/mp624183768/article/details/106122801
014