Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I still use UIKit/AppKit for my shipping apps.

What's the best way to learn UIKit/AppKit in 2024?



I liked Paul Hudson's Hacking with macOS (https://twostraws.gumroad.com/l/hwmacos) which includes an older AppKit edition of the book. You'll have to account for changes in Xcode since the book was published. Also, there's a chapter that uses the now-defunct Dark Sky API but you can replace it with Pirate Weather's API which is 1:1 compatible.


Paul Hudson is excellent. He has a bunch of video tutorials and blogs, that I still find useful. He's good for SwiftUI, as well.

I like his sense of humor, as well.

To wit: https://m.youtube.com/watch?v=a905KIBw1hs


Several years ago I wrote a blog post "Resources for learning Objective-C and AppKit": https://lapcatsoftware.com/articles/learning.html

There are probably a lot of resources and tutorials out there for learning the UIKit-Swift combination. For AppKit, on the other hand, most of the best resources are "old", which means they were written before Swift was introduced. Thus, if you want to learn AppKit, you probably want to learn Objective-C too.

You can of course write AppKit-Swift code, and many AppKit developers do. However, these AppKit developers learned AppKit-ObjC first and only later switched to Swift. I'm not aware of a lot of AppKit-Swift learning resources.


I’ve been learning AppKit-Swift to build my own screenshot annotation app, mostly using StackOverflow and reading Apple’s older docs which are all ObjC. There’s very few things that don’t translate 1:1 from ObjC to Swift with the same API names. As long as you know what a message-send function call looks like in ObjC, you can read such examples and apply them to Swift.

ObjC: [[FooClass alloc] initWithFoo: foo and bar: bar]

Swift: FooClass(initWithFoo: foo and bar: bar)


> Swift: FooClass(initWithFoo: foo and bar: bar)

Often looks like:

    FooClass(foo: foo, and: bar)
These days.


I'm not sure, but I'll bet there's a ton of blogs and wisdom on it, these days.

Most of the new stuff seems to use SwiftUI, but UIKit has been around since they first opened the SDK, and AppKit has been around longer than that.

Apple likes to pretend everyone uses SwiftUI, but I'll lay odds that most AAA apps are ObjC-based.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: