What's up YouTube? I'm Nick. I'm an iOS developer and in this series we're going to learn SwiftUI.
怎么了YouTube?我是尼克。我是一个iOS的开发者,在这个系列中我们将学习SwiftUI。
Now before we get into the course I want to quickly talk to you guys about what is SwiftUI,
现在,在我们进入课程之前,我想快速地和你们谈谈什么是SwiftUI,
about why I'm creating this course, and more importantly what are we going to actually learn,
关于我为什么要创建这门课程,更重要的是我们要真正学习什么,
what is the structure of this course. So SwiftUI and the UI stands for user interface
这门课的结构是什么?SwiftUI和UI代表用户交互界面
is a framework developed by Apple for creating these screens on an app for any Apple platform.
是Apple开发的框架,用于在适用于任何Apple平台的应用程序上创建这些屏幕。
So whether it's an iPhone, iPad, Apple TV, Apple Watch, or Macbook,
所以无论是iPhone、iPad、Apple TV、Apple Watch还是Macbook,
you can create apps on all of these platforms using SwiftUI.
您可以使用SwiftUI在所有这些平台上创建应用程序。
Now SwiftUI is actually fairly new. It was released in 2019, and since it's been released
现在SwiftUI实际上是相当新的。它于2019年发布,自从它发布以来
Apple has made a ton of updates and improvements and added new features,
Apple进行了大量更新和改进,并添加了新功能,
and they've made it pretty clear that SwiftUI is going to be the future of iOS app development.
他们已经非常明确地表示,SwiftUI将成为iOS应用程序开发的未来。
Now I'm mentioning this because there's a pretty big debate online about whether new developers
现在我提到这一点是因为网上有一个相当大的争论关于新开发人员是否
should be learning UI kit or SwiftUI. And some of you who are just starting out
应该是学习UI工具包或SwiftUI。你们中的一些人刚刚开始
might not even know that there are two options, but these are both UI frameworks developed by Apple
可能甚至不知道有两种选择,但这都是Apple开发的UI框架
for creating iOS applications. So you can build the exact same app using UI kit or SwiftUI
用于创建iOS应用程序。因此,您可以使用UI工具包或SwiftUI构建完全相同的应用程序
but the underlying code that you're going to actually type and you're going to actually write
但是你要实际输入并实际编写的底层代码
is going to be totally different. So it is important which UI framework you want to use for your app.
会完全不同。因此,您要为您的应用程序使用哪个UI框架非常重要。
Now UI kit, which we're not going to cover in this series because we're doing SwiftUI,
现在是UI工具包,我们不会在本系列中介绍,因为我们正在做SwiftUI,
but UI kit was released back in 2008 with the actual release of the App Store.
但UI套件早在2008年就随着App Store的实际发布而发布。
And since SwiftUI is so new, came out in 2019. If we start thinking about all of the apps
由于SwiftUI是如此之新,于2019年问世。如果我们开始考虑所有的应用程序
that are in the App Store right now, the vast majority of them are built on UI kit and not SwiftUI
现在在App Store中,其中绝大多数是基于UI工具包而不是SwiftUI构建的
because SwiftUI wasn't even an option until 2019. So from 2008 to 2019, everything was pretty much done with UI kit.
因为SwiftUI直到2019年才成为一个选项。所以从2008年到2019年,一切都几乎是用UI工具包完成的。
However, if we're looking at newer apps and if we're thinking about the future maybe two, three years down the line,
然而,如果我们正在寻找更新的应用程序,如果我们正在考虑未来,也许两三年后,
there's going to be more and more SwiftUI jobs. And that's because the newer apps are going to be built on SwiftUI
将会有越来越多的SwiftUI工作。这是因为较新的应用程序将基于SwiftUI构建
and also because as we're already seeing a lot of the older apps are starting to convert to SwiftUI.
也因为我们已经看到许多旧应用程序开始转换为SwiftUI。
So I'm telling you all of this because as it stands today, it is important to know both frameworks.
所以我告诉你们这些是因为今天,了解这两个框架都很重要。
However, I know both frameworks and I can confidently tell you that SwiftUI is much easier to learn and it's also much faster to implement.
但是,我了解这两个框架,我可以自信地告诉您,SwiftUI更容易学习,而且实现速度也更快。
So for example, if I was creating an app and I built it on UI kit for SwiftUI, the SwiftUI version would probably take me one third of the amount of time
例如,如果我正在创建一个应用程序,并且我在SwiftUI的UI工具包上构建了它,SwiftUI版本可能会花费我三分之一的时间
because it is so much easier to use, so much faster to implement.
因为它使用起来容易得多,实施起来也快得多。
And that's probably why Apple is pushing SwiftUI as the future of iOS development. It is just super powerful and it's super easy to use.
这可能就是为什么苹果正在推动SwiftUI作为iOS开发的未来。它超级强大,超级容易使用。
So the short answer to your question about whether or not you should learn SwiftUI, I would say the answer is definitely yes.
所以关于你是否应该学习SwiftUI的问题的简短答案是,我认为答案绝对是肯定的。
It is going to be extremely important in iOS development, especially if we're looking towards the future.
这对iOS发展非常重要,尤其是如果我们展望未来。
I want to quickly talk to you guys about why I personally am creating this course.
我想快速和你们谈谈为什么我个人创建这个课程。
So I've been answering a lot of questions on Stack Overflow lately.
所以我最近回答了很多关于Stack Overflow的问题。
And Stack Overflow is a website where programmers can ask and answer each other's coding questions.
Stack Overflow是一个程序员可以互相提问和回答编码问题的网站。
And I've noticed that there are a ton of new developers just learning SwiftUI and they're getting stuck on things that should be relatively easy, things that are the basics of SwiftUI.
我注意到有很多新开发人员刚刚学习SwiftUI,他们被困在应该相对简单的事情上,这些事情是SwiftUI的基础。
So this leads me to believe that a lot of the people learning SwiftUI either don't have a good course to follow or they're following a course and that course has them just jump into building an app.
所以这让我相信,很多学习SwiftUI的人要么没有很好的课程可以遵循,要么他们正在遵循一门课程,而这门课程让他们只是跳入构建应用程序。
And they find themselves kind of just copying the instructor, copying the code and not really understanding what the code is doing.
他们发现自己只是在复制老师,复制代码,而不是真正理解代码在做什么。
So I'm making this course to help beginners really get a mastery on the basics, the foundations of SwiftUI.
所以我制作这门课程是为了帮助初学者真正掌握SwiftUI的基础知识。
Because in SwiftUI, if you get a really good grasp on the basics, you can then excel very, very quickly.
因为在SwiftUI中,如果你非常好地掌握了基础知识,你就可以非常非常快地超越。
But if you start just developing apps and trying to make these complex screens, you're going to find that you run into a lot of errors, a lot of issues when code's not working correctly.
但是,如果您开始开发应用程序并尝试制作这些复杂的屏幕,您会发现您会遇到很多错误,代码无法正常工作时会出现很多问题。
And instead of spending hours trying to debug, trying to figure out why something's not working, it's better in the long run to just get a really solid understanding of the basics, of the principles of how SwiftUI works.
与其花几个小时试图调试,试图找出为什么有些东西不起作用,从长远来看,最好是对SwiftUI工作原理的基础知识有一个真正扎实的理解。
So I hate to be a buzzkill, but unlike a lot of courses out there in this course, we are not going to build an app.
所以我不想扫兴,但与本课程中的许多课程不同,我们不会构建一个应用程序。
Instead, this is just going to be a video series where in each video, we tackle and master one specific component in SwiftUI.
相反,这只是一个视频系列,在每个视频中,我们处理并掌握SwiftUI中的一个特定组件。
So we'll do a video on adding text to the screen, a video on adding shapes to the screen, a video on mastering frames and alignments.
所以我们会做一个关于在屏幕上添加文本的视频,一个关于在屏幕上添加形状的视频,一个关于掌握框架和对齐的视频。
So by the end of the course, you will be a master at all the individual components of SwiftUI.
因此,在课程结束时,您将掌握SwiftUI的所有单独组件。
So this way, when you go to actually start making an app, you have all of these tools ready. You understand how all of the components work, and all you have to do is put them together to make a really beautiful screen.
所以这样,当你真正开始制作一个应用程序时,你已经准备好了所有这些工具。你了解所有组件是如何工作的,你所要做的就是把它们放在一起,做出一个非常漂亮的屏幕。
So although we're not actually creating a full app in this course, as we start to progress, we will start creating screens and have a lot of real world examples as if this was an app.
因此,虽然我们实际上并没有在本课程中创建一个完整的应用程序,但随着我们开始进步,我们将开始创建屏幕并有很多现实世界的示例,就好像这是一个应用程序一样。
So you are still going to get a lot of hands-on experience on how to implement all of these components into real apps.
因此,您仍然会获得大量关于如何将所有这些组件实现到实际应用程序中的实践经验。
Now, I also want to mention here that after this course, I will be posting other courses where we actually do build apps.
现在,我还想在这里提到,在这门课程之后,我将发布我们实际构建应用程序的其他课程。
So this course is really to get a good understanding of the foundation, the basics.
所以这门课真的是为了很好地理解基础,基础。
And then later, we can start getting to more advanced things like building full apps and really crazy beautiful screens.
然后,我们可以开始做更高级的事情,比如构建完整的应用程序和非常漂亮的屏幕。
So I hope you guys are as excited as I am for this course. SwiftUI is a super powerful tool, and it's a skill that's going to be in a very hot demand in the future.
所以我希望你们和我一样对这门课程感到兴奋。SwiftUI是一个超级强大的工具,这是一项在未来会非常抢手的技能。
So if you're at all interested in this course, definitely hit that subscribe button to stay updated.
所以如果你对这门课程感兴趣,一定要点击订阅按钮保持更新。
As I make this video, I have zero subscribers because I am brand new to YouTube.
当我制作这个视频时,我没有订阅者,因为我是YouTube的新手。
So hit that like button if you enjoyed this video. Leave a comment if there's anything specific that you want me to cover in this course.
如果你喜欢这个视频,请点击喜欢按钮。如果你想让我在本课程中介绍任何具体的内容,请发表评论。
And as always, I'm Nick. This is SwiftUI thinking, and I'll see you in the next video.
和往常一样,我是尼克。这是SwiftUI思维,我们下一个视频再见。
Thanks for watching.
感谢收看。