|< What makes SwiftUI so attractive to learners and designers?||How to avoid going overboard with animations >|
Recorded – watch the full episode on YouTube.
Previously you've done a lot of work with web frameworks. How do you think SwiftUI compares to web frameworks such as React?
Meng To: So if I look at SwiftUI, it's a lot closer to React than UIKit, for example, and the way that you even code some of the layout, the modifiers and stuff like that. And also the way you code animations is very different. So yes, SwiftUI is much closer to React, which is why I believe there's such a popularity with SwiftUI right now, especially amongst people who are looking to learn iOS, right?
“Have you tried SwiftUI? That's the question. If you try it, please let me know, because I love it. This is one of the best things have used at least over the past five, six years, for sure.”
Those who have learned Swift in the past, they love Swift, they love the iOS platform, but the key is how do we convince the rest of the audience, those people who are considering Flutter who are considering Jetpack Compose or React Native, or all sorts of platforms that does cross platforms and whatnot.
Well, how do you convince them to use SwiftUI? The key to me is that you have SwiftUI. I think it's a lot simpler. It's a lot more modern. It's made by Apple, which means that it supports all of these SDKs and powerful things that you can do in iOS and it's native.
“SwiftUI does build on lots of the same concepts that really took off in React and we should be very grateful to that community for inspiring this kind of work and letting us take ideas from there.”
There's nothing you can ask more than that. The power of native cannot be understated. I suggest every designer, developer to really look at how you can build something in SwiftUI before judging it, because a lot of people are, they're like, “hey, I want to wait a little bit for SwiftUI. I want to wait because Flutter seems interesting. It's a cross platform. It has a lot of new ideas.” But have you tried SwiftUI? That's the question. If you try it, please let me know, because I love it. This is one of the best things have used at least over the past five, six years, for sure.
Would you say that we had seen similar levels of interest from designers for React as we have done for SwiftUI?
Meng To: Well, you brought up a great point. React definitely inspired SwiftUI in my opinion. To me as a designer, I always look for the best ideas. I always look for the best tools to use. And I'm not sponsored by SwiftUI. I mean, there's no way I can get sponsored by SwiftUI anyways, but it's just one of the best things I've ever used.
One thing that happened when I was teaching UIKit, because I've been teaching UIKit for about five years, is that one, it was very difficult to get a lot of people on board especially in term of getting Storyboard.
“And I'm not sponsored by SwiftUI. I mean, there's no way I can get sponsored by SwiftUI anyways, but it's just one of the best things I've ever used.”
There's a lot of division amongst folks who are using iOS to say, "Okay, should I use Storyboard? Should I use everything in Coach? Should I use Interface Builder?" There's so many things. It's very divisive. And then for me, it was very clear that if I wanted to teach the designers and get them to use Xcode, that I have to teach them Interface Builder, and Storyboard and try to connect it to the code.
But the problem is not with Interface Builder necessarily. The problem is after, right? Midroad, you have to connect the IBOutlets to the code. The editor itself, there's nothing wrong, but at some point you're going to be like, "I want to do more than this. I want to do animation. I want to make it more powerful. I want to have interactions." And if you want to do that, then you have to connect everything in code. And as soon as you do that, then it makes more complicated than either one. And to me, SwiftUI feels like the answer to that problem.
This transcript was recorded as part of Swiftly Speaking. You can watch the full original episode on YouTube, or subscribe to the audio version on Apple Podcasts.
SAVE 50% To celebrate Black Friday, all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.
Link copied to your pasteboard.