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

Поделиться
HTML-код
  • Опубликовано: 3 ноя 2024

Комментарии • 189

  • @brianbkcodes1449
    @brianbkcodes1449 5 лет назад +125

    The side-by-side comparison is great! Felt like it was a director's commentary or a sportscaster narrating what was happening in the game.

  • @PhilipBacchi
    @PhilipBacchi 5 лет назад +53

    This is fantastic and I LOVE the side by side comparison. PLEASE do more of these side by side videos!!!!

  • @awais.fayyaz
    @awais.fayyaz 5 лет назад +87

    You are doing amazing work Paul. Keep rocking !

  • @porroapp
    @porroapp 10 месяцев назад +2

    Watching this at the end of 2023, I can say I have no need to learn UIKit with SwiftUI. I come from a ReactJS background and learning SwiftUI just made a lot more sense given it's declarative nature and less boilerplate code. Very happy to learn SwiftUI it's so far so good.

  • @CapDrew
    @CapDrew 3 года назад +3

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

  • @tonynguyendtn1984
    @tonynguyendtn1984 5 лет назад

    Your videos are so good I’ve bought your book and now I watch and click on all the ads on your videos to make sure that you get every last cent out of the advertisers. You deserve it!

  • @alexanderlester7455
    @alexanderlester7455 4 года назад +8

    I would really like to see a similar video comparing UIKit (with Storyboard) compared to SwiftUI. I really appreciate this video though!! I’m finding the switch from UIKit to SwiftUI to be EXTREMELY difficult though honestly... It seems so difficult to write clean code using SwiftUI

  • @bobbynwm
    @bobbynwm Год назад

    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... :)

  • @bartoszdolewski4915
    @bartoszdolewski4915 5 лет назад +2

    Great comparison but I HIGHLY enjoy that kind of video template. I hope I'll see more video-templates like that from you, where the coding is done quite fast and you comment stuff in real time with pause breaks. Great way to keep video relatively short, busy millennials like me really appreciate this ! :)

  • @wyattb3138
    @wyattb3138 5 лет назад +1

    I’m learning Swift as a hobby. I use Interface Builder instead of coding with UI kit. It’s intimidating to see that I will have to learn how to programmatically make a UI. Your videos help me so much and help me gain experience in Swift too. Thank you.

  • @mauricejulesm
    @mauricejulesm 4 года назад

    I wish many people using this side by side way of comparing frameworks, it's very helpful when one wants to decide on which to use. Thanks +Paul Hudson

  • @AhmdIsmail
    @AhmdIsmail 2 года назад +1

    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

  • @hanzalaraza8709
    @hanzalaraza8709 5 лет назад +21

    if you are comparing both the framework and time to achieve the specific milestone , you should have chosen the fastest way for implement UIKIT which is through storyboard then we could call it a fair comparison .. by this time , this comparison is not fair .. we can achieve these milestones in much quicker way in UIKit by using Storyboard , outlets , actions etc
    Btw i like the way you are comparing frameworks

    • @rebeloper
      @rebeloper 5 лет назад

      Also, one could use awesome github repos like TinyConstraints in making layout super fast. The main difference between SwiftUI and UIKit is not how fast you can build apps, but how to approach building apps. This has also been said by Paul in numerous other videos of his.

  • @ltq0809
    @ltq0809 5 лет назад +3

    as we create a new project, we are choosing to use SwiftUI or Storyboard, not UIKit... so i would say, if we know how to use storyboard very well, it might not be slower than using swiftui

  • @cultibotics
    @cultibotics 5 лет назад

    Cool! Having three instances of Paul might make it even better: one working with and advocating/apologizing for UIKit, one working with and advocating/apologizing for SwiftUI, and one moderating.

  • @valerika9164
    @valerika9164 3 года назад

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

  • @cappuccinopapi3038
    @cappuccinopapi3038 5 лет назад +6

    I’m speechless this was so enjoyable, so much better than my university lecturer.

    • @ImprovingAbility
      @ImprovingAbility 4 года назад

      with the advent of the Corona virus traditional schooling will die (at least that's my hope)

  • @MrEvansjethro
    @MrEvansjethro 3 года назад +1

    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.

  •  5 лет назад +1

    “Hacking with SwiftUI” will be best series on RUclips !

  • @AleMohamad
    @AleMohamad 5 лет назад +4

    This was amazing! Loved the comparison, and it’s great to still show that UIKit still has the power to make iOS apps. It’s gonna be with us a lot more, until SwiftUI gets the power to compete with UIKit in bigger projects. 😉

  • @15458434
    @15458434 4 года назад +3

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

  • @charlesm.1638
    @charlesm.1638 4 года назад

    I wrote an app to be used within the company I work for and was stunned of how quickly I a managed to write the app in SwiftUI including having to fetch a JSON from my API. But I agree I am still working with both UIKit and SwiftUI.

  • @ondrejpisin7567
    @ondrejpisin7567 3 года назад

    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.

  • @dimiutube
    @dimiutube 5 лет назад +1

    Thanks, Paul! This was a good comparisson for these two frameworks. I will stay at UIKit, but SwiftUI is definetely a good way for building new Apps with limited functionality quickly.

    • @raitasorin
      @raitasorin 4 года назад +1

      Yeah but where is today Objective C ? So that far will go UIKit to will disappear as well just like Objective C so UI Swift will be taking he's place very Soon

    • @andreisaioc
      @andreisaioc 4 года назад

      @@raitasorin Not that soon, i suspect that another 2 solid years uikit will still be top. Then slowly fade away. The swiftui will need at least 2-3 years to mature at the point where you can make a real complex app. UIKIT is here for 10 years now...

  • @guitaripod
    @guitaripod 5 лет назад +3

    Awesome video. It's so cool how the SwiftUI code can run on all Apple devices with some minor adjustments.

    • @staybalancedn
      @staybalancedn 5 лет назад +1

      Guitaripod not my iPhone 6...

    • @guitaripod
      @guitaripod 5 лет назад +1

      staybalanced it’s time to move on from 2013 my friend

    • @staybalancedn
      @staybalancedn 5 лет назад +1

      Guitaripod give me one good reason of a feature to upgrade. I haven’t been moved to get a new phone new features seem more like gimmicks

    • @guitaripod
      @guitaripod 5 лет назад +1

      @@staybalancedn You already answered your own question 😸

    • @evennot
      @evennot 4 года назад

      ​@@guitaripod iOS 13 still has quite a few awful glitches.
      Forcing people to dispose a working device for sake of new way of arranging views in the editor is kind of a weak excuse.
      It's not revolutionary either. React Native goes with this concept a bit better: more forgiving view state management, stylesheets, etc.
      I have new devices for testing, but iPhone 6 is still more usable, even after I bought lightning-audio-data port adapter. TBH, newer iPads have sidecar option and apple pencil. First one is slightly glitchy, but second one is a killer option (both in terms of usability and price)

  • @SuperMacGuy
    @SuperMacGuy 5 лет назад +3

    Super cool demo. But I feel it’s not exactly fair to do all the layout in code for uikit. I’m a believer in doing that in the visual editor. Wouldn’t most people do it that way?

  • @mrglwatson
    @mrglwatson 4 года назад

    Wow, amazing that you programmed it that quick.

  • @RubenvandenEngel
    @RubenvandenEngel 5 лет назад +3

    As you said, UIKit and SwiftUI cannot easily be compared. For instance I'd usually create a xib file for the detailview just to make the layout with all the constrains using the interface builder. This is because the constrains in code are so ugly and take a lot of time to write. Now in SwiftUI constrains aren't a thing anymore and create elements by code is made a lot easier. So it's still not completely fair to write everything in code and time it. Then of course SwiftUI will be better.

  • @WolfiiDog13
    @WolfiiDog13 5 лет назад +1

    Just found this channel, and I'm loving it.

  • @Sergio-eg1ex
    @Sergio-eg1ex Год назад

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

  • @raitasorin
    @raitasorin 4 года назад +2

    Ouh mate i can't denied how that Beautiful and shiny was ! I love that Bro well done, please stay more around The Blue Planet

  • @denisblack9897
    @denisblack9897 5 лет назад +10

    swiftui is cool, but it still has 2 years till it's gonna be used in production

  • @thwKobas
    @thwKobas 3 года назад +1

    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.

  • @SladeruS
    @SladeruS 2 года назад

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

  • @ВладТретьяков-г4с
    @ВладТретьяков-г4с 2 месяца назад

    Take a moment to notice how SwiftUI introduces multiple levels of abstraction with extra `UIViews`, while UIKit keeps the view hierarchy looking neat and simple. 🎉

  • @surestamang33
    @surestamang33 4 года назад

    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.

  • @chesterman18g
    @chesterman18g 5 лет назад +3

    great video Paul! However, I think that with swiftUI (for the time being) it's a bit harder to make a really custom UI - currently we are using here basic UIKit ported elements. What you think? SwiftUI is more concise, no boilerplate code. Don't get me wrong, I am currently hesitating to start build a complex UI with SwiftUI.

    • @rebeloper
      @rebeloper 5 лет назад +2

      SwiftUI is still the new kid on the block, but when a UI component is missing one can always use the UIKIt version of it with UIViewControllerRepresentable

  • @CodeWithCal
    @CodeWithCal 3 года назад

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

  • @omick16
    @omick16 Год назад

    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

  • @100coinstar2
    @100coinstar2 Год назад

    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).

  • @ClarkCox
    @ClarkCox 5 лет назад +3

    Why, in the UIKit version did you need to add a wrapper view to inset the text? Why not just set a width constraint on the label?

    • @fdaygo7794
      @fdaygo7794 4 года назад

      I imagine to do it properly with display scaling

  • @anudeepananth
    @anudeepananth 3 года назад

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

  • @nikitayankov3935
    @nikitayankov3935 5 лет назад +24

    Would it be less lines of code and, probably, much faster with using storyboard for UIKit (outlets, view composing, segues, etc) ?

    • @VahidSayad
      @VahidSayad 5 лет назад

      of course.

    • @punishedbrains9954
      @punishedbrains9954 5 лет назад +2

      Yes and that's why I think it's not really a fair comparison. UIKit is meant to be "meant to be" used with the storyboard to set stuff up and then programmatically tweak it a bit. I think it would have finished very close if not faster.

    • @Seitenwerk
      @Seitenwerk 5 лет назад +1

      @@punishedbrains9954 Using SwiftUI ist much faster then Storyboards and UIkit. Example: Try setting up a table with Storyboard. You will have to add it to Storyboard, add a cell, design the cell. Then drag everything into your view controller. Then add the delegates, and delegate methods, then implement the code to tell the table how to deal with the data, which you will also have to implement.
      Now compare all this with how it works in SwiftUI: Just wrap whatever content you would like to have in a cell in "List(){..}". Finish. ^^Thats it. No Protocols, methods, data, etc.

    • @evennot
      @evennot 4 года назад

      @@Seitenwerk except when your table starts to grow immensely. Or if you'll need to perform animated edits to the table. Or if you need just to scroll somewhere in the list. Or basically anything other than a flashy demo.
      I think SwiftUI has giant potential but it's still just a tool for quick prototyping

    • @ecx007
      @ecx007 4 года назад

      @@Seitenwerk Really? With a simple right click you assign the delegates. And the methods of the tables I have them in a snippet

  • @TheHy6xD
    @TheHy6xD 5 лет назад +1

    Paul, I did not know these features like customSpacing for stackView and fast coding in UIKit. I am tired so much of spacing in stackView, thanks for that method a lot!

  • @CanispaterChristmas
    @CanispaterChristmas 5 лет назад

    Nice comparison! I use the containerView trick with stackViews all the time. lol!

  • @tedvga
    @tedvga 3 года назад +1

    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.

    • @YousefHaidary
      @YousefHaidary 3 года назад

      Very helpful and insightful comment. Thank you

  • @karis_nemik
    @karis_nemik 3 года назад

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

  • @jjamespacbell
    @jjamespacbell 5 лет назад +4

    Great Video and loved the comparison but... Most developers would have used Autolayout in storyboard to create that app prior to UIKit. would that have been the faster approach?

    • @jjamespacbell
      @jjamespacbell 5 лет назад

      I meant to say prior to SwiftUI not prior to UIKit

    • @ashleymills69
      @ashleymills69 5 лет назад +4

      @@Glassip It's NOT "always more clear to have everything in code"… that's purely your opinion .

    • @b_t_s8792
      @b_t_s8792 5 лет назад

      I think you’d be surprised at the percentage of UI in the top chart apps that is not storyboard based. There are trade offs between code and storyboards, and the larger the team and longer lived the app, the worse storyboards look. That’s a big part of why swiftui is so exciting, we can finally use interface builder without most of the downsides.

  • @deegha
    @deegha 4 года назад +2

    My question is why not comparing the time taken with story board? Its not an illegal way of building apps 🧐. Its like you are asking a moter bike not to start its engine and race with a foot cycle 🤦🏾‍♂️

  • @AaronHilton
    @AaronHilton 5 лет назад

    Great work!! Loved the side by side comparison.

  • @tigran.zakaryan
    @tigran.zakaryan Год назад

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

  • @alejmc
    @alejmc 3 года назад +1

    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.

    • @twostraws
      @twostraws  3 года назад

      Definitely the Power Pack, but save your money and follow my free 100 Days of SwiftUI first: hackingwithswift.com/100/swiftui

  • @swelsh
    @swelsh 5 лет назад

    Fantastic idea for a video, Paul!

  • @pickemparty
    @pickemparty 4 года назад +2

    Can you show the side by side of keyboard tabbing from one text field to another as is done easily in UIKit and unknown in SwiftUI?

  • @AvenCode
    @AvenCode 5 лет назад +2

    It's so clear! Thank you so much! Great job.

  • @volimpia
    @volimpia 4 года назад +3

    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.

  • @fibowibo5359
    @fibowibo5359 3 года назад

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

  • @ZoeSummers1701A
    @ZoeSummers1701A 5 лет назад

    I really appreciate the effort and detail in this comparison but it’s not a fair test.
    UiKit’s auto-layout is horrendously complicated because it’s so flexible. But it’s intended to be done in IB with code as the fallback. Surely a better test is do UIKit in IB vs SwiftUI?

  • @gillesashley9314
    @gillesashley9314 8 месяцев назад

    I'm planning to move to Canada from Africa, I want to know which market dominates there between iOS native development vs Flutter cross platform development?

  • @jason18401
    @jason18401 5 лет назад +2

    Hey Paul, can we get a tutorial more slowly explained as well?

  • @andywong3095
    @andywong3095 5 лет назад

    Excellent.
    I think, I am very good with XAML, but I can estimate, it will take me, about 1 hour (may be more) to do the same app on UWP.
    Nothing wrong with XAML or UWP, it is you, you are much better than me. Ha.
    Thank you!

  • @mountainsmusicandcode
    @mountainsmusicandcode 5 лет назад

    As ever, hugely helpful and informative - thank you Paul.

  • @DorkSanat
    @DorkSanat Год назад

    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

  • @AliAljoubory
    @AliAljoubory 5 лет назад +1

    This is awesome. Quick question, do you need to have a particular Swift or Xcode version to use SwiftUI? Like Swift 5? My current codebase is Swift 4.2 but I'd love to use it.

    • @Gabifuertes
      @Gabifuertes 5 лет назад

      Ali Aljoubory you need the Xcode beta, which runs on Catalina beta, and you can only target iOS 13 or higher. I’m not sure wether Swift 5 is required but it’s set by default for new projects.

    • @ricocrescenzio5067
      @ricocrescenzio5067 5 лет назад

      It’s required xcode 11, swift 5.1 and iOS 13 to run. I think it’s too early to make production apps with swift ui, because there will be still users with iOS 12 in next 1-2 years

  • @IMostfa
    @IMostfa 5 лет назад +10

    Thank you very much, don’t you think that using UiKit with storyboards will make things a lot faster ?

    • @evennot
      @evennot 4 года назад

      Also using layout frameworks for doing layout is much faster way to go

    • @IMostfa
      @IMostfa 4 года назад

      Jeffrey Haines after five months of using SwiftUI I'm regretting my original comment 😂 SwiftUI is way better

  • @shingetzu88
    @shingetzu88 5 лет назад +2

    Amazing! Thanks Paul. Are any of these projects in your github?

  • @marioepsilon
    @marioepsilon 3 года назад

    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.

  • @richardwalters9249
    @richardwalters9249 4 года назад

    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

  • @darryl_young
    @darryl_young 5 лет назад

    Another great video. Thanks, Paul!

  • @cridgit001
    @cridgit001 4 года назад

    I subbed because of this video. Super helpful. Thanks so much.

  • @richprice5434
    @richprice5434 5 лет назад

    great video...im still in the UIKit camp for now. my question is... will all the big companies adapt to SwiftUI or stick with UIKit? i still think when going for jobs for the next few years, building out an app in code using UIKit is still going to get you job over SwiftUI.

  • @mohsenkhosravinia4703
    @mohsenkhosravinia4703 4 года назад

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

  • @retrocu
    @retrocu 5 лет назад +5

    i never use uikit without interface builder. so all of coding the interface is simply do not exists in my workflow. if i need a custom ui element sure i can code that but after coding over i use that new uielement inside of interface builder. and i use a storyboard for every viewcontroller and it works great and clean. without interface builder swiftui will not replace uikit. for people who do not use ib and code every ui element sure it is great. but without interface builder this is simply is much more code. and i do not want code more.

    • @altamistral
      @altamistral 5 лет назад +2

      I agree. A comparison to UIKit without IB is like competing in a race blindfolded. If he used IB the UIKit workflow would have been ridiculously faster.

  • @zatochiSiberian
    @zatochiSiberian 2 года назад

    Thanks.
    What about memory footprint and performance?

  • @jonathanmorris1480
    @jonathanmorris1480 4 года назад

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

  • @mizoto6550
    @mizoto6550 5 лет назад +3

    SwiftUI won but you had to purposely make uiKit take longer by doing it programmatically.
    Not sure why you did that if the goal was to see which one was faster...

  • @darrylthomas4306
    @darrylthomas4306 3 года назад

    Excellent video. Thanks! Just subbed.

  • @top10exploration1
    @top10exploration1 4 года назад

    That was Great Toturial easy comparison.

  • @0xifarouk
    @0xifarouk 5 лет назад +2

    Can you upload this project please?

  • @atlassimulor8512
    @atlassimulor8512 5 лет назад

    Thanks for the info and for these examples!

  • @drewmccormack
    @drewmccormack 5 лет назад +12

    "Lots of boiler plate code for UIKit". Yes, that is because you didn't fully leverage the storyboard. This whole in-code approach is a waste of time. You could have done all the autolayout etc, detail controller etc much faster using the storyboard. So a bit of an apples and oranges comparison. The UIKit version could be much faster.

    • @vladnet5485
      @vladnet5485 5 лет назад

      Drew McCormack agree 👍

    • @pierremoreau5597
      @pierremoreau5597 5 лет назад +1

      I agree, he could have done this app in UIKit within 9min too and less line of code then SwiftUI if he used properly the storyboard.

    • @vladimircreator
      @vladimircreator Год назад

      Storyboard is less maintainable than code so it does not make sense to use it

  • @HerrThomasE
    @HerrThomasE Год назад

    Great! Thank you very much 🙂

  • @evelynlima3769
    @evelynlima3769 5 лет назад

    How about a mixed one? Using swift together with swiftUI

  • @ricocrescenzio5067
    @ricocrescenzio5067 5 лет назад +1

    Nice but I’d rather have used storyboards and xibs for this kind of comparison

  • @supriedonk
    @supriedonk 5 лет назад

    Just wondering, on UIKit we usually load asynchronous data on ViewDidLoad or ViewWillAppear. How we do it on SwiftUI? On init? or introduce another method ( like load data, and somehow reload the UI once the data is loaded )

    • @supriedonk
      @supriedonk 5 лет назад

      i just found out from your others video, that we can use @State for this case. Can’t wait to try it out

  • @shotaioramashvili3935
    @shotaioramashvili3935 5 лет назад

    Great work Paul !!! Thank you.

  • @regandawson6347
    @regandawson6347 5 лет назад +4

    UIKit ‘in code’ is not a fair comparison lol this would be trivial to make in interface builder, almost no code at all required

  • @glennadams7047
    @glennadams7047 5 лет назад

    Finally a rational comparison. Thank you! Is a download available ?

  • @ThierryZanzouri
    @ThierryZanzouri 4 года назад

    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.

  • @westfield90
    @westfield90 5 лет назад

    As a complete novice wanting to learn iOS programming which platform do you recommend to get the basics correct ?

    • @Aaron-dt3xz
      @Aaron-dt3xz 5 лет назад +2

      Depends on what you want to do. SwiftUI is amazingly fast and easy to use, but it is definitely missing some features. For instance, if you want to do something like, say, move a textbox up above the keyboard when typing, that isn't something you can do with SwiftUI yet. SwiftUI also doesn't support a lot of elements like WebViews. Additionally, SwiftUI only supports iOS 13, so if you're planning on actually distributing an app, it shouldn't be used as a complete replacement for UIKit yet. Therefore, I'd recommend learning UIKit (at least the basics) as well as SwiftUI, since the two are interoperable. That way, you can create most of the stuff you need in SwiftUI which makes things a lot easier, and if you want any of those advanced features only in UIKit, you can embed them into SwiftUI (and vice versa).

  • @sergeykolinko
    @sergeykolinko 5 лет назад

    Hi Paul
    I’m playing with SwiftUI wright now. And I have a question to you about the WabKit:
    import SwiftUI
    import WebKit
    struct WebView : UIViewRepresentable {
    let request: URLRequest
    func makeUIView(context: Context) -> WKWebView {
    return WKWebView()
    }
    func updateUIView(_ uiView: WKWebView, context: Context) {
    uiView.load(request)
    }
    }
    struct webView_Previews: PreviewProvider {
    static var previews: some View {
    WebView(request: URLRequest(url: URL(string: "www.apple.com")!))
    }
    }
    //All works. But keyboard is not appearing when it needs. If you have any solutions it will be great! Thank you!!

  • @rodyharris
    @rodyharris 5 лет назад

    Excellent video! Thank you

  • @timmy334
    @timmy334 5 лет назад

    Can you do one addressing translating a UITextView for text entry into SwiftUI?

  • @andrejkling3886
    @andrejkling3886 4 года назад

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

  • @droid6298
    @droid6298 4 года назад

    Sir how can i pick videos like in image picker SwiftUI

  • @moksh8
    @moksh8 5 лет назад +9

    Why would anyone use UI kit to hand code the design in the first place ?! That’s counter productive and against the basic functionality of the product.

    • @Ascentyon
      @Ascentyon 5 лет назад +6

      Some reasons I'm strongly in favour of hand coding the design:
      - Storyboards/Xibs are XML files. Have you seen the conflicts on those things? Also, reviewing pull requests that change them is massive PIA.
      - There is no way to define a constant for your colors, padding, font. Good luck updating your branding.
      - Reusing components is a massive PIA. If you need the same collection view cell on 2 view controllers, you need need to create a Xib for it and do half the work in code.
      - Simply opening Storyboards/Xibs files in a different version of Xcode generates 5-10 lines of changes.
      - If you make a typo in Interface Builder, you get errors at runtime. If you make a typo in code, you get an error at compile time
      - With interface builder, you need to use implicitly unwrapped optionals. If you forgot to link that IBOutlet, enjoy your crash at runtime.
      Yes, you do it 2-5x faster in interface builder, but you pay that heavily in maintenance cost later.

    • @moksh8
      @moksh8 5 лет назад

      @@Ascentyon Excellent points ! More the reason why the UIKit must evolve to rectify the shortcomings or the whole design platform needs a better workflow. Perhaps the Swift UI is a step in that direction. Wouldn't you agree that approach to design is best designed and not coded - visually - WYSIWYG ?!

    • @ecx007
      @ecx007 4 года назад +1

      @@Ascentyon Fake, after 3 months without touching the Swift UI code this will look Chinese to you.

  • @ejpusa
    @ejpusa 5 лет назад

    hi, is there a link to the code examples? thanks

  • @averoes4029
    @averoes4029 5 месяцев назад

    Thank you !!

  • @ozanyasindogan
    @ozanyasindogan 3 года назад

    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

  • @mobilemon5032
    @mobilemon5032 5 лет назад

    So we can't use both UIKit and SwiftUI in the same project? It has to be one or the other?

    • @DonavonBuchanan
      @DonavonBuchanan 5 лет назад

      Both can be used in the same project. It looks like SwiftUI will only be supported on iOS 13 and MacOS Catalina though.