Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

slooksterPSV

macrumors 68040
Original poster
Apr 17, 2004
3,545
309
Nowheresville
Is it safe to assume that Swift is the future and ignore learning (relearning) Objective-C?
What about UIKit? Is the future Swift UI or should I learn UIKit too?

I’m thinking I may just learn it all and whatever happens happens. But I’d like to know what others think.

Mainly I want to create some iOS apps for work-related tasks/info so those will be APIs but if I find something I want to create for release on App Store will Swift UI most likely be the most rounded option?
 
I suppose it would be a personal preference. Swift is pushed hard as the next coming, and I thought it was interesting until about version 3 or so, but it has since become a bit of a mess. Objective-C isn't going away any time soon, especially for low level stuff, and there are plenty of other languages and development environments.

The main thing is to become familiar with Apple's API. UIKit is the framework, and Swift UI is just another interface toolkit to try to make it easier to declare. Once you understand the API and can navigate Apple's documentation (which is another story), you can use whatever toolkit fits your style.
 
  • Like
Reactions: slooksterPSV
I suppose it would be a personal preference. Swift is pushed hard as the next coming, and I thought it was interesting until about version 3 or so, but it has since become a bit of a mess. Objective-C isn't going away any time soon, especially for low level stuff, and there are plenty of other languages and development environments.

The main thing is to become familiar with Apple's API. UIKit is the framework, and Swift UI is just another interface toolkit to try to make it easier to declare. Once you understand the API and can navigate Apple's documentation (which is another story), you can use whatever toolkit fits your style.

I wouldn't mind relearning Objective-C; I think I'd want the same book again, but that was back in what.... 2005? I think it was Stephen Kochan.

So I think I have a path now. =) Thank you! =)
 
Hm. I've long looked at Objective-C as maybe the ugliest programming language there is. But yeah they'll live side-by-side for long to come, though I see Swift as the "front facing" language; The one Apple prefers developers use, so WWDC slides are mostly in Swift. - Though I've heard that, at least up to the 2019 WW, they wrote all the slides internally in Objective-C and the Swift team redid it for Swift
I really love Swift to bits though. It's got so many elegant features. Really easy to learn but with many options for syntactic sugar and "shortcuts"

In terms of platform, I think SwiftUI has some elegance, and it's nice in some aspects like cross-platform UI code. But I wouldn't want to just have SwiftUI at my UI-creating fingertips. As Red Menace says, it sort of acts as another interface to CocoaTouch/UIKit anyway
 
  • Like
Reactions: alien3dx
Hm. I've long looked at Objective-C as maybe the ugliest programming language there is.

I laughed at this. In terms of syntax it actually makes sense and visually separates things out in a manner that makes it easier to quickly glance though - as odd as that sounds. Such as a prefix of -(type) is quickly pointed out to be a function or implementation of a function. Though I think you define interfaces for classes the same way.
I also like the bracket variables for allocation and initialization: SomeObject *obj = [[SomeObject alloc] init];
Tells me its going to allocate memory and initialize the object.

It was fun and looked cool when I was younger. It was easy for me to grasp and develop in too. However, I'm really loving Swift right now. It has everything and more that I want from these languages. I never know how much Closures meant to me.
 
I laughed at this. In terms of syntax it actually makes sense and visually separates things out in a manner that makes it easier to quickly glance though - as odd as that sounds. Such as a prefix of -(type) is quickly pointed out to be a function or implementation of a function. Though I think you define interfaces for classes the same way.
I also like the bracket variables for allocation and initialization: SomeObject *obj = [[SomeObject alloc] init];
Tells me its going to allocate memory and initialize the object.

It was fun and looked cool when I was younger. It was easy for me to grasp and develop in too. However, I'm really loving Swift right now. It has everything and more that I want from these languages. I never know how much Closures meant to me.

Yeah I always hated the square bracket thing; But I should note that I don't properly really know Objective-C. I've never properly written anything in it. The only time I see it is when I look something up on Stack and an answer is written in Obj-C and I have to parse it to figure out what the equivalent Swift would be. So in that sense take my opinion with more than a pinch of salt :)

Swift is just a super quick language to get work done in. Just wrote this game for my game design course in a single day
(that's just a screenshot from it)

It's a top down shooter where you shoot bacteria inside a bloodstream (theme for the game jam is COVID). But being able to code up things like that in just a day; less than a full day since we had a lot of lectures and stuff beforehand. I don't think I could've done it in anything but Swift and SpriteKit. But I'm also most comfortable in that environment so YMMV :)
 
  • Like
Reactions: slooksterPSV
Ended up purchasing SwiftUI Essentials - iOS Edition.
I've learned a lot for Swift and I'm about 33% way through, but some areas I skimmed through. So far its good! =) Need to practice the learning though.
 
Ended up purchasing SwiftUI Essentials - iOS Edition.
I've learned a lot for Swift and I'm about 33% way through, but some areas I skimmed through. So far its good! =) Need to practice the learning though.
swiftui is nice but if you have customer stuck to old ios 12 maybe got some issue.
 
I wouldn't invest in Objective-C. Swift is pretty mature now.
As for Swift UI. I am looking at it now. I am not a fan. Yes it comes with advantages working in teams but it gives me a headache creating views. I am looking at it because I am not sure Apple will hold on to UIKit.
 
I wouldn't invest in Objective-C. Swift is pretty mature now.
As for Swift UI. I am looking at it now. I am not a fan. Yes it comes with advantages working in teams but it gives me a headache creating views. I am looking at it because I am not sure Apple will hold on to UIKit.

What about SwiftUI "gives you headaches"?

I feel like some views are much easier to create in SwiftUI and some easier in UIKit. And fortunately you can use them interchangeably - I don't think UIKit is going anywhere. At the very least I see UIKit and SwiftUI living alongside each other for a full decade at least
 
I also believe Apple not ditching UIKit soon. It complicates things though.
The past years Swift finally knew some stability eg optional mess at start.
Now we will have to deal with it again.
Also for more experienced devs it is doable.
Most starters need time to fully understand closures, protocols etc
I myself am starting to think if I really need to go through this process I might as well learn fluffer or react. At least I will reach android users too.
 
  • Like
Reactions: slooksterPSV
I also believe Apple not ditching UIKit soon. It complicates things though.
The past years Swift finally knew some stability eg optional mess at start.
Now we will have to deal with it again.
Also for more experienced devs it is doable.
Most starters need time to fully understand closures, protocols etc
I myself am starting to think if I really need to go through this process I might as well learn fluffer or react. At least I will reach android users too.
React isn't too bad - more useful when you learn states (simplifies things). I probably would be cautious of Flutter - Google seems to like to introduce new Frameworks and quickly dissolve them.

I watched a video where a guy made the same thing in UIKit and SwiftUI - I was surprised at the lesser amount of code SwiftUI took. Don't get me wrong, I do like how with UIKit you have a bit more.... building blocks to do things (not sure if that's what I want to say), but some of the tasks seemed... excessive, but then again try building this stuff in C or that.

I agree, most starters need help with Closures and protocols. Protocols, I'm understanding to be like Interfaces - the foundation for a class that implements it - that's how I'm viewing them and how they were explained. Closures can be a life-saver - especially in threaded situations where you have multiple instances running and need to reflect a result back onto one call versus another call.
 
I agree, most starters need help with Closures and protocols. Protocols, I'm understanding to be like Interfaces - the foundation for a class that implements it - that's how I'm viewing them and how they were explained. Closures can be a life-saver - especially in threaded situations where you have multiple instances running and need to reflect a result back onto one call versus another call.

To a large extend I'd say protocol and interface are pretty much just interchangeable terms for the same thing, depending on what language you're describing, yeah :)
And closures are great indeed!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.