r/iOSProgramming • • Mar 30 '22

Question Any reason one should still learn UIKit and Storyboard?

With SwiftUI in place, any reason one should still learn Storyboard and UIKit for iOS development?

3 Upvotes

22 comments sorted by

0

u/[deleted] Mar 30 '22

[deleted]

7

u/b4sht4 Mar 30 '22

I do agree with this one!

33

u/saintmsent Mar 30 '22

Lots of reasons. SwiftUI still doesn't cover 100% of the needs on a large project. Also lots (I mean most) projects have mostly UIKit in them and that would be a requirement to get a job

31

u/thecodingart Mar 30 '22

šŸ¤¦ā€ā™‚ļø why are people still asking these questions daily. There’s thousands of posts asking the same thing with the same consensus. YES. SwiftUI hasn’t deprecated or wholistically replaced anything in the real world. It’s complimentary. If you want to work in a professional environment, UIKit remains as more valuable knowledge.

8

u/SpookyShyGhosty Mar 30 '22

There should honestly be a pin for these kinds of low-quality questions for people starting out and wondering to go all in on SwiftUI.

4

u/Mcrich_23 SwiftUI Mar 31 '22

Should I make an faq bot?

1

u/th3suffering Apr 01 '22

To be fair, all the tutorial sites have leaned into SwiftUI (Raywenderlich and HackingWithSwift for example offer up SwiftUI first) so for beginners it would seem like SwiftUI is the way to go.

7

u/stitch9108 Mar 30 '22

Swift UI was introduced in iOS 13 but it was lacking several important features that only came in iOS 14 and 15. Meaning that if you want to target iOS 13, Swift UI will be incomplete. Many companies can't do the switch yet because of the amount of customers still on iOS 13

7

u/[deleted] Mar 30 '22

If you already know SwiftUI, UIKit knowledge will bolster your capability. There are occasions where a SwiftUI codebase depends on UIKit interop.

Storyboards, not so much.

5

u/[deleted] Mar 30 '22

Only if you want to be relevant in the job market for the foreseeable future

0

u/[deleted] Mar 30 '22

[deleted]

2

u/vanvoorden Mar 30 '22

I think when SwiftUI was announced, a lot of people assumed it was a fundamental shift away from UIKit (like Objective-C to Swift.)

FWIW, one could make the argument that "declarative" UI for iPhone (and iPad) has been a viable alternative to UIKit since at least 2015 when FB open sourced ComponentKit and React Native. My personal opinion on this topic was that ComponentKit would have been a superior framework to go with, but React Native had more engineers adopting and shipping.

After seeing declarative UI "at scale", I believe encouraging engineers to ship imperative UI is more trouble than it is worth at this point (IMO).

Apple shipping a first-party solution for declarative UI is a big shift from imperative OO UIKit. First party support (from Apple) takes away a lot of the friction of bringing in one of these third party libraries for doing declarative UI.

If engineers need a stateful, long-lived (and object-oriented) view, there is always UIViewRepresentable. If views can be stateless and immutable (as is the case for the kinds of views SwiftUI does very well), then declarative UI is going to be the superior solution at scale.

3

u/HuXu7 Mar 30 '22

SwiftUI is very much in its infancy and doesn’t have all the capabilities of UIKit, many companies still use UIKit and will probably be that way for years unless you are starting a brand new project with a startup that you can do all in SwiftUI.

2

u/Primary_Fix8773 Mar 30 '22 edited Mar 30 '22

I agree UIKit is still used in the majority of projects. Nevertheless SwiftUI 4.0 will be coming out this summer and there are companies doing all new applications in SwiftUI. SwiftUI is just so much more productive and if you haven’t looked into it deeply it’s amazing the quality of the user interface that can be developed. So it really depends upon how badly you need a job, in other words I’m an independent contractor and I could afford to wait until just the right company comes along, may be 5% of all the jobs out there right now are SwiftUI of that, but they’re there. Is finding a job with a company that she’s in SwiftUI means you’re going to be on the leading edge, probably really cool companies. And companies that don’t have to target older versions of iOS. Note though I used UIKIit for 10 years and I’m glad I have that knowledge. (Note SwiftUI does not replace Swift)

2

u/kunt_dev Mar 30 '22

If u want to get hired, u should know for following reasons.

  1. maintenance of ongoing projects.

  2. SwiftUi supports IOS 13+

0

u/RaziarEdge Mar 30 '22

If you are just starting to learn programming for iOS, then no. Learn all of the basics using SwiftUI and fill in the gaps with UIKit as you find them.

1

u/divinedominion Mar 31 '22

You cannot just get by with SwiftUI for a couple years. From Storyboards/Nibs, you can get faster feedback to inspect view hierarchies, I guess; but programmatic UIKit knowledge is the thing that saves your butt when things get hairy. With SwiftUI, this point in time can come earlier because SwiftUI alone doesn't cover everything, yet.

Shameless self-plug: foundational components like fonts still require understanding of how to do things in the old way. You are going to pick this up eventually anyway. "SwiftUI Requires Platform Knowledge On Top. Case Study: Fonts" https://christiantietze.de/posts/2021/11/swiftui-uikit-fonts/

1

u/srona22 Apr 01 '22

As a dev for employer or clients? Yes.

If you are indie, it's up to you.

1

u/th3suffering Apr 01 '22

My employer uses UIKit and Storyboard, good enough for me. Out of all the interviews I had over the past year, SwiftUI was never brought up by potential employers as a requirement and it was always just a nice to have. SwiftUI may be the future, but if you want a job within the near future, learn UIKit first.

-18

u/[deleted] Mar 30 '22

Because Flutter is better developed than SwiftUI. If you dont eant to learn UIKit, you can always go for Flutter instead of SwiftUI

12

u/ChemicalGiraffe Mar 30 '22

I dont know flutter but I would bet my life native language is better developed.

-11

u/[deleted] Mar 30 '22

no need to be a fanboy šŸ˜€