
swiftUI
2020 最新swiftUI课程,,用心做博客,把最好最全面的知识展现在你们面前
安果移不动
精通Android,Swift,Flutter,Python,Php,按键精灵,易语言。曾为华为录制精品课程,拥有资质:按键精灵顶级证书;
产品秀:https://www.anguomob.com
B站:https://space.bilibili.com/482453235
展开
-
swiftUi propertWrapper 自定义标记属性
上篇文章我们知道@Status 的作用了那么我们也可以自己定义类似的这种标签。。首先我们先来看下不使用属性标签,向导页面如何写//// PropertyWrapperView.swift// learn_swiftUi//// Created by liuan on 2020/9/4.// Copyright © 2020 liuan. All rights reserved.//import SwiftUIextension UserDefaults{ p.原创 2020-09-04 16:53:55 · 256 阅读 · 0 评论 -
swift UI @state
原创 2020-09-04 15:57:49 · 202 阅读 · 0 评论 -
swiftUI 旋转缩放动画
code // // ContentView.swift // learn_swiftUi // // Created by liuan on 2020/5/14. // Copyright © 2020 liuan. All rights reserved. // import SwiftUI struct ContentView: View { @State private var..原创 2020-09-04 15:52:17 · 821 阅读 · 0 评论 -
swiftUI 为什么显示不出 canvas
看文档,说要更新 MacOS。更新后切换到SceneDelegate页面 然后切出来canvas 再点击右上角resume 再点击左下角的固定按钮即可原创 2020-09-04 15:19:59 · 908 阅读 · 0 评论 -
Swift Ui 特点
Swift Ui 是一种基于Siwft的强大能力。简单创新的构建用户界面的方法,并且可以运行在苹果所有平台上。Swift Ui 采用声名式语法,因此你可以简单声名你的用户界面Xcode 可以拖拽控件进行编程实时编译创建动画也很简单...原创 2020-09-04 14:30:49 · 359 阅读 · 0 评论 -
016_swiftui_日期的使用
//// ContentView.swift// learn_swiftUi//// Created by liuan on 2020/5/14.// Copyright © 2020 liuan. All rights reserved.//import SwiftUIstruct ContentView: View { var now=Date() static let dateFormatter:DateFormatter = { let .原创 2020-05-14 17:54:35 · 468 阅读 · 0 评论 -
015_swiftui_刘海屏适配
swiftUi创建的视图是默认在刘海屏幕的安全区域以内的。之前我们设置图片也用到了这个个属性。现在我们再来使用下吧 .edgesIgnoringSafeArea(.all)下面就是图片了。原创 2020-05-14 17:47:26 · 882 阅读 · 0 评论 -
014_swiftui_Text相关属性
效果代码//// ContentView.swift// learn_swiftUi//// Created by liuan on 2020/5/14.// Copyright © 2020 liuan. All rights reserved.//import SwiftUIstruct ContentView: View { var body: some View {// VStack最多容纳10个视图 VStack{原创 2020-05-14 17:40:16 · 615 阅读 · 0 评论 -
013_swiftUi_目录介绍
AppDelegate.swift应用代理文件。主要用来监听来自其他程序的外部事件。或者在程序启动之后进行预处理操作,通常在程序启动之后。SceneDelegate.swift场景代理文件主要用来法处理分屏功能,并管理应用程序的显示方式,例如让多个实例同事运行。或在一个实例移至后台时采取措施ContentView.swift内容视图文件是默认的用户界面。开发者可以在此文件...原创 2020-05-06 18:50:58 · 321 阅读 · 0 评论 -
012_swiftUi_快捷键切换
代码和视图的切换option command Enter原创 2020-05-06 18:41:53 · 377 阅读 · 0 评论 -
011_swiftui_卡牌战争。比点数
效果图使用到的资源图片https://download.csdn.net/download/mp624183768/12320155拖动到xcode后。记得修改名称back->card1Background->background目的主要是熟悉使用swiftUI中的布局。image。和Button的点击事件和使用源代码//// Cont...原创 2020-04-10 17:01:22 · 371 阅读 · 0 评论 -
010_swiftui_复杂布局
用到的资源效果展示在使用swift_UI中有一些快捷操作操作1 代码中快速新增布局移动选中控件后 按住command键然后弹出操作菜单 可以选中包裹布局让在外面快速添加一层布局操作2 布局中快速新增代码在ui中选中控件。按住command键,然后双击键盘左键就可以打开快速操作面板。也能在下面选中Embed in HStack.或者VStack 在外层...原创 2020-04-05 00:21:45 · 418 阅读 · 0 评论 -
009_swiftui_获取网络请求并展示
import SwiftUI struct Joke: Codable,Identifiable{ let id = UUID() var joke: String var status: Int} struct ContentView: View { @State private var jokes: [Joke] = [] ...转载 2020-03-31 19:25:36 · 2489 阅读 · 2 评论 -
008_swiftui_优化老虎机应用
上节课 我们学会了如何提取布局。。为了加深印象。。我们继续提取012代码章节中的代码进行合理的优化。实际编程中。这样的优化。会让你的代码更加简洁。我们把图片的Image 提取到新建的CardView.swift Ui上 代码如下//// CardView.swift// Slots Demo//// Created by liuan on 2020/3/31./...原创 2020-03-31 18:00:42 · 361 阅读 · 0 评论 -
007_swiftui_@State与@Binding实战中应用
我们在上面的文章中,已经频繁用到了@State下面构建一个颜色选择器也是同样的使用了@State效果展示代码展示 // // ContentView.swift // Slots Demo // // Created by liuan on 2020/3/31. // Copyright © 2020 liuan. All...原创 2020-03-31 16:25:26 · 627 阅读 · 0 评论 -
006_swiftui_构建老虎机应用
// // ContentView.swift // Slots Demo // // Created by liuan on 2020/3/31. // Copyright © 2020 liuan. All rights reserved. // import SwiftUI struct ...原创 2020-03-31 15:00:20 · 407 阅读 · 0 评论 -
005_swiftui_sf-symbols 系统资源
网址https://developer.apple.com/design/human-interface-guidelines/sf-symbols/overview/有1500个系统图标。并且已经适配了黑暗模式我们如何使用呢访问上方网址下载安装并打开这个应用(ps:替代方案 使用网站sfsymbols.com 现在好像不能访问了 等恢复把)打开后就像上面图一...原创 2020-03-30 20:21:28 · 574 阅读 · 0 评论 -
004_swiftui_填充数据与点击事件
根据true 和false 来切换心得图片//// ContentView.swift// SwiftUi_panel//// Created by liuan on 2020/3/27.// Copyright © 2020 liuan. All rights reserved.//import SwiftUIstruct ContentView: View {...原创 2020-03-30 19:39:43 · 946 阅读 · 0 评论 -
003_swiftui_使用图形化界面来操作
使用swiftui图形编辑器首先要确保macOs版本是在打开编辑器首先选择canvas 打开布局预览。。我的版本不够 先升级一下,生成的代码如下//// ContentView.swift// SwiftUi_panel//// Created by liuan on 2020/3/27.// Copyright © 2020 liuan....原创 2020-03-27 18:33:13 · 660 阅读 · 0 评论 -
002_swiftui_交互
资源下载地址https://download.csdn.net/download/mp624183768/12271888使用Swift 展示图片 首先把下载的资源拖动到ios的资源目录中修改布局文件//// ContentView.swift// siwft_ui_test//// Created by liuan on 2020/3/25.// Co...原创 2020-03-27 16:37:23 · 257 阅读 · 0 评论 -
001_swiftUi_HelloWorld
新建swift工程先来看下之前如何创建ViewController.swift中修改代码如下//// ViewController.swift// SwiftUi//// Created by liuan on 2020/3/23.// Copyright © 2020 liuan. All rights reserved.//import UIKitcl...原创 2020-03-25 20:48:24 · 402 阅读 · 0 评论