SwiftUI vs UIKit – Comparison of building the same app in each framework

SwiftUI vs UIKit – Comparison of building the same app in each framework

Paul Hudson

5 лет назад

150,952 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@omick16
@omick16 - 31.10.2023 05:01

Why didn't you use a storyboard on your StarshipViewController and just pass around the values? Although sometimes buggy, I think the storyboarding is one of the strengths of UIKit

Ответить
@tigran.zakaryan
@tigran.zakaryan - 30.08.2023 10:32

Paul is your opinion about UIKit is still relevant by 2023?

Ответить
@generalrodcocker1018
@generalrodcocker1018 - 30.07.2023 09:45

sorry what is the point of your video? fast forward wanking about your code?

Ответить
@CryptoArch
@CryptoArch - 28.06.2023 14:47

This video is ridiculous... it doesn't compare the speed of both languages... it just SHOWS YOUR OWN LIMITED knowledge on the given languages... A fair competition would be 2 different people, highly skilled and advocates of each clashing in multiple different small chanllenges

Ответить
@100coinstar2
@100coinstar2 - 24.06.2023 01:58

I love your videos... I know I'm late to respond but to be honest, I would rather like to see a video comparing the headaches involved in trying to figure something out that is not working as expected and the time it takes googling or jumping into the documentation for solutions. I think in that case, SwiftUI development might be slower (but that's just me).

Ответить
@DorkSanat
@DorkSanat - 16.06.2023 12:09

the course I bought is ios app development - angela yu from udemy and it is based on xcode 12 (when ui kit was still used) but this is 2023 and xcode is ont having uikit option we create a file based on swift ui, what should I do ??? please help

Ответить
@HerrThomasE
@HerrThomasE - 12.04.2023 00:59

Great! Thank you very much 🙂

Ответить
@Sergio-eg1ex
@Sergio-eg1ex - 12.02.2023 17:37

Hi, thanks a lot. What is yours opinion about start learning SwiftUI in 2023? Or you strongly recommend to learn UIKit as well?

Ответить
@bobbynwm
@bobbynwm - 01.02.2023 21:48

Mate, this is funnier than expected! You make UIKit look like an old timer :) This video definitely convinced me to move into SwiftUI prototyping as honestly I've got completely cluttered into Storyboards and ViewControllers mixed with code and seques and all of that ... just to build the prototype for development... :)

Ответить
@user-qw1gf6st3o
@user-qw1gf6st3o - 10.11.2022 22:31

you are code gun!

Ответить
@erikciaugomez9131
@erikciaugomez9131 - 16.09.2022 05:15

What is LOC?

Ответить
@tibettenballs4962
@tibettenballs4962 - 25.06.2022 20:35

I have a question. Do you Australians really catch and eat a crocodile every Saturday?

Ответить
@zatochiSiberian
@zatochiSiberian - 02.05.2022 18:53

Thanks.
What about memory footprint and performance?

Ответить
@AhmdIsmail
@AhmdIsmail - 25.01.2022 21:49

Thanks Paul for this great video! I actually started to use SwiftUI on my main project couple of months ago and I'm mostly satisfied except for one problem which is backward compatibility. Many great features of SwiftUI today are exclusively available for iOS 15 which makes me feel that I should've waited for a year or two not to get new features but to only use the existing ones while being able to support at least two major versions of iOS

Ответить
@SladeruS
@SladeruS - 24.12.2021 13:41

Thanks you for your videos to help us to learn swift. Have nice Christmas.

Ответить
@solotech3105
@solotech3105 - 15.12.2021 05:36

Lewis Hamilton
Is the GOAT in F1

Ответить
@MrEvansjethro
@MrEvansjethro - 12.10.2021 21:48

Thanks Paul, very informative. I'm starting out with IOS development and I needed to know what I am getting myself into. You simply made things easier for me. I truly appreciate you.

Ответить
@anudeepananth
@anudeepananth - 24.09.2021 16:16

This is a great video comparing the two platforms, amazing... thanks for this...

Ответить
@valerika9164
@valerika9164 - 30.08.2021 11:46

Side by side comparison is a really cool idea! Thank you for you work, Paul 🙏 You are amazing!

Ответить
@saketmrari
@saketmrari - 24.07.2021 09:31

Thats not even fair comparison who codes UIKit with this verbosity? - you do this things in interface builder with auto layout and stuff

Ответить
@CodeWithCal
@CodeWithCal - 26.06.2021 02:38

I wonder if UIKit would be quicker if you use storyboard to define the layout rather than doing it programmatically?

Ответить
@karis_nemik
@karis_nemik - 11.06.2021 19:13

Thanks for a great video! I'm curious, which you did first - UIKit or SwiftUI version?

Ответить
@ondrejpisin7567
@ondrejpisin7567 - 28.05.2021 18:07

I'm not sure how valid this is, usually you use SnapKit or some extensions for constraints, but also you choose app format where SwiftUI really shines. Anyway nice comparison, thank you.

Ответить
@fibowibo5359
@fibowibo5359 - 14.05.2021 14:44

what was the real time without speedup? only detail I am missing, nice work overall!

Ответить
@abdalrahmanaboujeeb1049
@abdalrahmanaboujeeb1049 - 14.04.2021 06:04

I did the math and, comparing the difference in time for a simple app like this you would save around 36 hours of coding.
This only applies if you know what you're doing without googling anything, this what makes a difference I guess because UIKit has a larger community now than SwiftUI.

Ответить
@darrylthomas4306
@darrylthomas4306 - 12.04.2021 19:03

Excellent video. Thanks! Just subbed.

Ответить
@annegreen153
@annegreen153 - 11.04.2021 02:58

The even excellent excited wilderness intradurally ruin because permission corroboratively empty modulo a unhealthy brian. berserk, aboriginal vase

Ответить
@ozanyasindogan7615
@ozanyasindogan7615 - 09.04.2021 05:35

I like the simplicity of SwiftUI but it’s still a very buggy framework as far as I observed within one week of using it

Ответить
@tedvga
@tedvga - 02.04.2021 18:24

Compatibility.
Unfortunately SwiftUI is only available for iOS 13.0 and higher.

Using SwiftUI would thus mean that you can no longer support people with older devices.
There are still millions of iOS devices out there with iOS versions older than iOS 13, and are no longer be updated because Apple (policy) does not supply updates for this older devices.

Take, for example, a banking application with millions of users. Of course, as a bank, you must support as many devices as possible, even those that are bought a long time ago. These are your customers, were you are depending on, whether rich or living on a small budget.

Note that for a lot of people, iPads and iPhones are relatively expensive devices. if you live on a small pension budget, in many cases you can't even afford to replace your iPad or iPhone There are millions out there that can't.

That is why I make my apps available starting with iOS 9. Unless special features only available in later iOS versions are needed e.g. like AR. I have absolutely no problem with targeting starting with an old iOS version. (but maybe Apple has, because from a commercial point of view of a hardware seller, it is more profitable to "encourage" people to replace their devices as soon as possible. However, I wouldn't go that far to say that Apple is introducing new tools like SwiftUI all the time for that very reason..)

Using UIKit is not so hard as it might look for beginners, especially when using a language like Swift.
Paul, you're talking about a lot of boilerplate code, and yes, using UIKit needs more of that, but most of it in my apps is written-once-use-anywhere in class extensions or even UIKit sub-classes that I've made.
(the latter is one of the advantages of using Object Oriented programming, you haven't got this flexibility with SwiftUI because it is based on structs instead of classes) So, in the end because of extensions and sub-classes, my apps are relatively small and run great even on the older devices. No problem.

In summary, in this perspective, to get a job as iOS developer, it is very important to master UIKit because at many companies, SwiftUI cannot be deployed, simply because it is not available in older iOS devices that need to be supported.

There is a social aspect to this too, think about it, e.g. maybe you have (grand)parents who are happy with their older iPads and iPhones. so restricting or upgrading your apps to a higher iOS version counts them out.

Ответить
@thwKobas
@thwKobas - 22.03.2021 18:14

Not fair at all, there is no need to create detail view controller in code, you can just drag and drop UI controls on storyboard and create whole screen easy. This would for sure reduce lines of code for UIKit, and I think you did it on purpose this way. I don't say UIKit is better, or that SwiftUI is better, just that this was not good enough comparison.

Ответить
@jefflicona3924
@jefflicona3924 - 18.02.2021 01:15

I’ll be doing your 100 days of SwiftUI soon.

Ответить
@jefflicona3924
@jefflicona3924 - 18.02.2021 01:14

Thank you!!

Ответить
@alejmc
@alejmc - 25.01.2021 03:20

This is amazing on so many levels. Having bumped into your channel has been a great thing.
Thanks lot for these.
Had a question, was checking your Gumroad and for a complete beginner on Swift (but not so much on programming, I mostly do C# and shaders) which pack should I begging with? Power Pack or Plus Pack?
Cheers.

Ответить
@marioepsilon
@marioepsilon - 29.12.2020 07:31

The layout part that wasted most of the time for the UIKit version was done wrong, you don't need to use stacks, in fact stacks makes it harder. You can do it very quickly in many ways, I can do the entire constraints of that view with just 5 lines of code using constraintsWithVisualFormat.
Anyway, "faster" or "less code" is not a suitable measure of how good something is. When it comes to code, you might have to spend more time at some point, but it saves you time later.

Ответить
@gabrielrml
@gabrielrml - 28.12.2020 14:29

So the moral of the story is use UIKit and charge by the hour.

Ответить
@CapDrew
@CapDrew - 28.11.2020 07:44

I am new to swift and this is great advice. Never knew what they were until now

Ответить
@15458434
@15458434 - 21.11.2020 23:44

I'm pretty sure this was faster constructed in Interface Builder. Having both projects finished around 9 minutes.

Ответить
@richardjukilonzo1409
@richardjukilonzo1409 - 17.11.2020 22:40

been here for decades??

Ответить
@Enlightenedexploration636
@Enlightenedexploration636 - 12.11.2020 07:43

That was Great Toturial easy comparison.

Ответить
@ridesandlearn
@ridesandlearn - 09.09.2020 05:17

Really inspiration video for me. As react native developer,I don't know about it much. I want to know the SwfitKit and UIKit. Your video made me clear. Thank you.

Ответить
@andrejkling3886
@andrejkling3886 - 01.09.2020 17:53

Gratitude...Gratitude... Gratitude... All Best in your own Great Way

Ответить
@mohsenkhosravinia4703
@mohsenkhosravinia4703 - 09.08.2020 01:18

I think you should make the second vc in storyboard and then compare.

Ответить
@volimpia
@volimpia - 08.08.2020 09:58

Great video, although i feel it was not very fair to UIKit. It has storyboards and it is a greate advantage, if we had done all the code in storyboard - it would have taken equal time to SwiftU, and code lines would have been shorter. I love storyboards and do not code programmatically much, so maybe i am biased. But storyboards make creating UI super fast, in fact at first i found it faster than SwiftUI.

Ответить
@richardwalters9249
@richardwalters9249 - 30.07.2020 20:55

Question: If I'm jumping into iOS programming, and I am using the Stanford 2020 SwiftUI class (on the multithreading lecture now) ... am I doing well, or should I have backed up and learned UIKit / Storyboarding first ? Curious as to your opinion

Ответить
@ThierryZanzouri
@ThierryZanzouri - 24.07.2020 17:09

True but not sure it will be the same while handling datas manipulation and complex actions. SwiftUI is great to design screen but when you try to manipulate datas its need a lot of thinking.

Ответить
@jonathanmorris1480
@jonathanmorris1480 - 19.07.2020 21:58

What about next 4 years time? Will Swift ui be the norm in 4 years?

Ответить
@willasaskara
@willasaskara - 12.07.2020 00:40

thanks!

Ответить
@MrNosugarcoating
@MrNosugarcoating - 04.07.2020 03:32

Damn it. It took me a month.

Ответить
@droid6298
@droid6298 - 08.06.2020 07:50

Please do help me sir

Ответить
@droid6298
@droid6298 - 08.06.2020 07:50

Sir how can i pick videos like in image picker SwiftUI

Ответить