美文网首页
SwiftUI入门 day1

SwiftUI入门 day1

作者: LV大树 | 来源:发表于2025-03-05 15:09 被阅读0次

sample 1

swiftUI 1

code as follow:

struct ContentView: View {
    var body: some View {
        VStack {
            Spacer()
            Image(systemName: "globe")
                .imageScale(.large)
                .foregroundStyle(.red)
            Spacer()
            Text("Hello, world! for SWiftUI ,start today at 2025.3.5")
            Spacer()
            Text("again")
            Spacer()
            HStack(alignment: .top, content: {
                Text("who are u")
                Text("can dare to beat me")
                Text("if you can't learn this skill quickly,you will lose in the future")
            })
            Spacer()
            HStack(alignment: .bottom) {
                Text("who are u")
                Text("can dare to beat me")
                Text("if you can't learn this skill quickly,you will lose in the future")
            }
            Spacer()
        }
        .padding(30)
        
        
    }
}

#Preview {
    ContentView()
}

sample 2

swiftUI 2

code as follow:


import SwiftUI

struct ContentView: View {
    var body: some View {
        VStack(alignment: .leading, spacing: 10) {
            Spacer()
            Image(systemName: "globe")
                .imageScale(.large)
                .foregroundStyle(.red)
            Spacer()
            Text("Hello, world! for SWiftUI ,start today at 2025.3.5")
            Spacer()
            Text("again")
            Spacer()
            HStack(alignment: .top, content: {
                Text("who are u")
                Text("can dare to beat me")
                Text("if you can't learn this skill quickly,you will lose in the future")
            })
            Spacer()
            HStack(alignment: .bottom,spacing: 30) {
                Text("who are u")
                Text("can dare to beat me")
                Text("if you can't learn this skill quickly,you will lose in the future")
            }
            Spacer()
        }
        .padding(20)
        
        
    }
}

#Preview {
    ContentView()
}

相关文章

  • SwiftUI简单使用

    SwiftUI入门教程[https://github.com/SimpleBoilerplates/SwiftUI...

  • SwiftUI入门 - 代码仓库地址发布

    SwiftUI入门 - 代码仓库地址发布 重新整理了代码和目录 置顶 菜鸟入门,各位大佬轻喷,如有谬误之处欢迎讨论...

  • SwiftUI快速入门

    SwiftUI 是一种非常简单的创新方法,可以利用 Swift 的强大能力在所有苹果设备平台上构建用户界面。通过 ...

  • SwiftUI 入门(一)

    官方有三个例子,分别是简单认识,制作圆形图片和调用地图。 1.创建一个新项目并探索画布 2.创建一个自定义图像视图...

  • SwiftUI快速入门

    官网教程

  • SwiftUI 入门指北

    SwiftUI 是什么 SwiftUI 是苹果2019年 WWDC 推出的新 UI 开发框架,主要特点是声明式语法...

  • SwiftUI:入门教学

    原创:知识点总结性文章创作不易,请珍惜,之后会持续更新,不断完善个人比较喜欢做笔记和写总结,毕竟好记性不如烂笔头哈...

  • iOS SwiftUI 入门

    目前swiftUI最低支持iOS13,苹果还在不断升级完善,目前还不成熟,因为现在widget必须用swiftUI...

  • SwiftUI Bluetooth 03 之标识符列表与扫描具有

    通过《SwiftUI Bluetooth 一篇文章入门掌握蓝牙编程(教程含代码)》我们掌握了CoreBluetoo...

  • SwiftUI入门到精通

    SwiftUI要求 iOS13.0+ 快捷键 control + option + 点击:出现属性编辑器 comm...

网友评论

      本文标题:SwiftUI入门 day1

      本文链接:https://www.haomeiwen.com/subject/olphmjtx.html