Another small detail I’ve implemented in #Oliphaunt: the Lists timeline now synchronises with the sidebar’s Lists group. Quite pleased with the smooth animation — it’s those subtle touches that make the difference.
DarwinKit looks interesting. It’s a Golang Framework to build macOS apps and lets you call Objective-C APIs.
#golang #macos #macdev #objectivec #appkit
DST change reminded me of that time QA discovered that, if you build a date from NSDateComponents, any missing items will not be set to zero, but will be set to the corresponding value from the current date and time.
Which meant that my March 30th, 12:00 would get random one-minute-drift like 12:00:59 because the user entered the date right before a minute change.
Makes sense for the date, but was a bit bewildering for the time, especially seconds.
RM2000 is now available for public beta testing via Apple TestFlight
I wanted to make a curating & idea collection app (think of bookmark managers, PureRef, or Are.na) but for snippets of sound playing anywhere from your computer.
Let me know what you think!
https://testflight.apple.com/join/jtGpAsYy #skeuomorphism #swiftui #appkit #macos
It’s kind of strange that if you have several NSToolbars in your app and the user customizes the display mode in one of them to, say, “Icon and Text” this state does not sync to all of the app’s toolbars. There also doesn’t seem to be any obvious way to observe changes to these settings. I guess that’s just okay and the user is expected to customize them all separately..?
Or I wait until next WWDC and our Mac windows won’t have toolbars anymore as they have been designed for “the next generation of users”.
#AppKit #UIKit #CollectionView
Any (NS/UI)CollectionView fans here? I’m trying to make a good collection view UI. It is just a simple flat scrolling column of things, should be simple layout.
I want the cells to size themselves to the SwiftUI content in them, which they almost do, but not when I resize the window and things start to wrap differently.
What am I missing? How should I make the heights respond better to window resizing?
Code: https://gist.github.com/jaanus/66e3d863941ba645c88220b8a22970e1
The 2nd edition of macOS Apprentice is now available from Kodeco. This is my book for beginners or near-beginners who want to start learning Swift, SwiftUI and AppKit for building Mac apps.
It's now been updated for Swift 5.9, macOS 15 and Xcode 16.2.
More details at https://troz.net/post/2025/macos-apprentice-update/
Read the book at https://www.kodeco.com/books/macos-apprentice/
A small detail I implemented in the #Oliphaunt sidebars is synchronised animations when using drag and drop. I’m quite pleased with how it turns out!
Is there really no equivalent to NSColor(named:, bundle:) for UIColor? How do I load a UIColor from a *specific* Asset Catalog associated with my framework bundle?
Here it is: A comprehensive look at `NSItemProvider`: what it does, how it works, and how to use it properly. I want this to be a one-stop-shop reference for anyone using this class in their projects.
NSItemProvider is a key class in iOS and Mac Catalyst, used in everything from Drag and Drop, to Pasteboard, share sheet, and beyond. Understanding how this class works will help you make better apps and gain insight into what the system does for you.
Please read the post, and send me feedback. Share it with your iOS developer friends. Let me know what you think!
https://www.humancode.us/2023/07/08/all-about-nsitemprovider.html
I would go even further that the “controllers” in the modern #AppKit / #UIKit world are even further away from the original conception of #MVC, and they’re hardly “controllers” in the original sense any more.
A Window Controller (AppKit) and View Controller (AppKit/UIKit) are tightly coupled to a specific Window or View, so much so that they are basically one and the same—no architectural advantage is lost by combining the Window Controller with its window; or the View Controller with its View.
I’ve always argued that the distinction between Views and View Controllers are quite arbitrary. VCs are used to house lots of functionality that regular Views don’t have—but you could have achieved the same by declaring a View subclass that conforms to the additional protocol, and doing away with the view-creation logic, couldn’t you?
IMO, the “MVC” in UIKit has no controller at all, when you think about it.