SwiftUI iOS 16 Crash Course : Emoji Quote App in SwiftUI

4970992_b5fb

欢迎使用 SwiftUI 进行 iOS 开发。这是一个速成班,所以让我们保持简短和甜蜜。

本课程的目标是尽可能多地涵盖使用 SwiftUI 进行 iOS 16 开发编程的功能。这是一个没有废话方法的速成班。

在涵盖了 SwiftUI 的大量基础知识(堆栈、表单、列表、ForEach、按钮、滑块、选择器、颜色选择器、滚动视图、工作表、状态、绑定、动画等)之后,我们继续介绍主应用程序。

粗略地说,这个应用程序有一个闪烁的表情符号,旁边有一个对话泡泡(类似于 Duolingo 的风格),对话泡泡中会出现当天的名言。我们学习如何从互联网上随机获取报价。我们得到了一张图片列表,里面有引述。我们可以编辑文本颜色、文本大小、图像大小。我们可以将此引用图像保存到我们的相册或使用共享链接进行共享。

以下是我们将涵盖的主题和我们将创建的应用程序的列表。
基本。我们首先简要介绍了 Text、修饰符、HStack、VStack、ZStack、状态变量、动画、onAppear。
超越基础。我们涵盖了稍微更高级的基础知识,例如 ForEach 视图、工作表、选择器、滑块、拨动开关、滚动视图、按钮等
。主应用程序。从今以后,我们将深入研究主要应用程序。
应用程序图标。我们学习如何基于 pexels 和 figma 创建应用程序图标。
SVG 转 PNG。我们分解 SVG 图像并使用 figma 转换为 PNG。换句话说,我们拍摄表情符号的 SVG 图像,并将眼睛与图像的其余部分分开。这样,在课程的后期,我们可以为眼睛设置动画,就好像它们不时眨眼一样。
讲话泡泡形状。我们使用 Shape 和 Path 来创建对话泡泡。此外,我们学习如何向对话气泡添加文本。
浅色和深色模式。我们将学习如何创建支持明暗模式的调色板。此外,这很容易定制。如果您决定更喜欢不同的配色方案,那么必要的更改就很少。
报价模型。我们基于我们将在课程中使用的免费报价 API 创建报价模型。
引用视图模型。这是 MVVM(模型、视图模型、视图设计模式)的一部分,它可以自然地与 SwiftUI 配合使用。View-Model 可以粗略地认为是连接我们看到与之交互的视图和为我们的数据建模的幕后模型的粘合剂。
表情符号忍者。此时,当我们点击表情符号时,会生成一个新的报价,此外,如果我们在报价上使用长按手势,则会使用上下文菜单将报价复制到剪贴板。
网格图像。我们创建一个图像网格。列数取决于使用的是 iPad 还是 iPhone。在整个项目中,我们致力于适应 iPhone 和 iPad。
共享图像视图。我们创建了一个共享表,我们可以在其中自定义图像和报价。例如,我们可以更改文本颜色和大小,也可以更改图像大小并共享图像或将图像另存为图片。
离线报价。我们使用的报价 API 是免费的,但是该 API 对我们每天可以使用多少报价没有明确的限制。如果我们超过限制,那么我们会创建一个函数,该函数会根据内部报价列表随机创建报价。
测试应用程序。我们运行应用程序并测试功能。值得在真实设备上而不是在模拟器上测试应用程序。

我们在很短的时间内涵盖了大量的材料。因此,SwiftUI 和 iOS 开发速成班。

就像我所有的课程一样,这门课程是动态的,我会定期添加内容。然而,本课程的目标是对 SwiftUI 和 iOS 16 开发有一个简洁、简洁但相当全面的体验。因此,我将保持课程的一般风格,即直接而切题。

我希望您喜欢这门课程,就像我喜欢创建它一样。也让代码成为你自己的。尝试并发挥创造力。尝试使用您从本课程中学到的知识来实现​​您自己的 App 创意。

我随时可以回答问题并且反应迅速。我每天查看两次问答和私信。

快乐的编程,祝你有美好的一天,我喜欢你的编程之旅!

Last updated 12/2022
Duration: 2h 43m | Video: .MP4, 1280×720 30 fps | Audio: AAC, 48 kHz, 2ch | Size: 1.21 GB
Genre: eLearning | Language: English[Auto]

Direct, non nonsense approach to iOS Development.

What you’ll learn

Learn to build an iOS 16 App
Learn good programming practices
Get a taste of what can be done in SwiftUI within two hours
Have fun programming and exploring

Requirements

There are no prerequisites besides wanting to learn

Description

Welcome to iOS Development using SwiftUI. This is a crash course so let’s keep it short and sweet.

The goal of this course is to cover as many features as possible in iOS 16 development programming using SwiftUI. This is a crash course with a no b.s. approach.

After covering quite a lot of basics of SwiftUI (Stacks, Forms, Lists, ForEach, Buttons, Sliders, Pickers, Color Pickers, Scroll Views, Sheets, state, binding, animations, etc) we move on to the main app.

Roughly speaking this app has a blinking emoji with a speech bubble next to it (similar in style to Duolingo) and in the speech bubble a quote of the day appears. We learn how to grab a random quote from the internet. We are given a list of images with the quote inside. We can edit the text color, the text size, image size. We can save this quoted image to our photo album or share it using a share link.

Here is a list of the topics we will cover and the Apps we will create.
Basics. We begin with a very brief introduction to Text, modifiers, HStack, VStack, ZStack, state variables, animations, onAppear.
Beyond the basics. We cover slightly more advanced basics such as ForEach views, sheets, pickers, sliders, toggle switches, scroll views, buttons, etc.
The Main App. Henceforth we delve onto the main app.
App Icon. We learn how to create an App icon based on pexels and figma.
SVG to PNG. We disassemble a SVG image and convert to PNG using figma. In other words we take an SVG image of an emoji and separate the eyes from the rest of the image. That way at a later stage in the course we can animate the eyes as if they are blinking from time to time.
Speech Bubble Shape. We use Shape and Path to create a speech bubble. Moreover, we learn how to add text to the speech bubble.
Light and Dark mode. We learn how to create a color palette that will support light and dark mode. Moreover, this is easily customizable. If you decided you prefer a different color scheme then the necessary changes are minimal.
Quote Model. We create a model of a quote based on a free quote API that we will be using in the course.
Quote View Model. This is part of the MVVM (Model, View-Model, View design pattern) which works naturally with SwiftUI. The View-Model can be roughly thought of as the glue connecting the view that we see an interact with and the model behind the scenes that models our data.
Emoji Ninja. At this point when we tap on the emoji a new quote is generated and in addition if we use a long press gesture on the quote then the quote is copied to the clipboard using a context menu.
Grid images. We create a grid of images. The number of columns depend on using an iPad or iPhone. Throughout the project we address adapting to both the iPhone and iPad.
Share Images View. We create a share sheet where we can customize the image and quote. For instance we can change the text color and size and we can also change the image size and share the image or save the image as a picture.
Offline quote. The quote API we are using is free, however the API does have an undefined restriction on how many quotes we can use daily. In case we exceed the limit then we create a function that randomly creates a quote based on an internal list of quotes.
Testing the App. We run the App and test out the features. It is worthwhile to test the App on a real device and not just on the simulator.

We cover an impressive amount of material in a very short time span. Hence a crash course in SwiftUI and iOS Development.

Like all of my courses this course is dynamic and I will be adding content regularly. However the goal of the course is to have a succinct, terse yet fairly comprehensive taste of SwiftUI and iOS 16 Development. So I will keep the general flavor of the course, that is, to be direct and to the point.

I hope you enjoy this course as much as I enjoyed creating it. Also make the code your own. Experiment and be creative. Try to implement an App idea of your own using what you’ve learned from this course.

I am always available for questions and am highly responsive. I check the Q & A and direct messages twice a day.

Happy programming, have a Great day and I enjoy your programming journey !

Ron

Who this course is for
Beginner-advanced programmers or anyone wanting to learn to program iOS 15 and iOS 16 using SwiftUI
Anyone who wants a quick overview of what can be done in SwiftUI

原创文章,作者:steven,如若转载,请注明出处:https://rr3d.cn/39752.html

赞 (0)
steven的头像steven
上一篇 2022年12月14日
下一篇 2022年12月14日

相关推荐

发表回复

登录后才能评论
分享本页
返回顶部