So, it turns out that in #macOS 14 #Sonoma, if you have a NSPopUpButton, and use removeFromSuperview and then later addSubview to add that item again to a view, macOS doesn't draw the button properly, until it gets clicked at least once.
(setting up said Popup is very expensive, as in "slow", in the app in question, so for 15 years, it was a working idea to keep it around)
Awesome.
Yet another #bug in the long long list of massive problems in the #AppKit system frameworks in #macOS14.
Adding a “Git config options” table to Retcon, for seeing current values.
When an option isn't set, the app tries to be helpful and shows the actual resolved value.
Do you have a Mac app that prompts for Mac App Store reviews using SKStoreReviewController or the requestReview SwiftUI action? The review window is getting presented inactive and in the background on macOS Sonoma. We came up with a workaround:
People often ask me, if DaftCloud is written in SwiftUI. Nope, it's AppKit with some weird design pattern. Most screens are just CollectionViews with DiffableDataSource which gets Diffed / Redrawn on State Updates.
I love SwiftUI on the iOS, but I heard that it's still not ready for macOS (after 4 years?)
The next build of #Oliphaunt will have a media viewer to view media files (image, audio, video and GIF). It is built completely in #AppKit. No #SwiftUI was used at all.
I noticed some inconsistency in #macOS text selection behavior. If I have some text selected and I shift-click before the selection, the selection start point moves to the clicked point. But in some places, the end point also moves to the previous start point.
Try it! Shift-click before some selected text …
Safari address bar: extends selection
Settings search field: replaces selection
Anyone know why?
I thought maybe #SwiftUI vs #AppKit, but after many experiments I don't think so.
A little code goes a long way. Just popped up a SwiftUI view with a TextField and a TextEditor, and sure enough, that's the difference! TextField (NSTextField) has the selection replacement behavior, while TextEditor (NSTextView) has the selection extending behavior. #macOS#SwiftUI#AppKit@bgannin
I’m looking for a new freelance project as an iOS/macOS developer! Familiar with #Swift, #SwiftUI, #AppKit, #UIKit, and recently really into #TCA and #CloudKit. Creator of Diagrams for Mac, featured in the Mac App Store (https://diagrams.app). Open to remote, short to mid-term collaborations. If this sounds interesting, I’d be happy to chat.
Three years ago on this day, I published my first Mac app, HacKit. It’s a Hacker News reader and the name is a portmanteau of Hacker News and AppKit. It’s a pure Cocoa app written in Swift with no SwiftUI integration.
Couple years ago I recreated Classic Mac OS progress and indeterminate progress bars with Core Animation. I really need to find a project to use them in! 😁
Also, the barber pole style indeterminate progress bars were just sooooo “Macintosh.”
I hope everyone has a great day except the person who decided to remove them from modern macOS. Ugh.
The next build of Oliphaunt will have a proper tab support. It will also respect your tab setting in System Settings. Is this a feature that you will use?
I know this is just a highlight color and not the accent color, but Apple needs to bring this back for Accent Colors -- There needs to be a Graphite accent color too. They replaced it with basic Grey and it's not the same.
Grey colored controls often look disabled.
Also this is just a #Graphite Aqua appreciation post. It's just gorgeous.
I feel like Apple got rid of NSDrawer because it would pretty much break with full-screen functionality... at least this is my thinking.
But they could have kept them for apps that don't support full screen and have a max size much smaller than the size of your display. They're still hella useful and cute.
Probably one of my fave "fine tuning" APIs in #AppKit that I just love: acceptsFirstMouse(for:)
This is great for unintended actions that might happen if your users clicks somewhere in a window to bring it to the forefront but might have clicked a control.
Example: Mail overrides this for the Delete button. If Mail is in the background, if you click over the Delete button to bring it forward, it brings Mail to the front but the button will ignore that initial click.
Achievement: improved UI responsiveness by not iterating over NSTreeController.children (that seemed to be super slow) but over the underlying data that fuel the tree controller. That was not an obvious fix, and not noticeable on small tree #appkit