Does someone know what causes Xcode to regularly add/remove the focusRingType="none" attribute in macOS Storyboards? It's making diffs much messier than they should be!
#MacDev#AppKit question: if I have a main storyboard set in Info.plist, and an initial (entry point) window controller in that storyboard (with "single presentation"), so like in the Mac app Xcode template, the storyboard automatically creates the window controller and its window and displays it; can I get a reference to that controller from AppDelegate somehow? (Calling instantiateInitialController creates a second window controller for some reason…) 🤨
I wonder, is there a built-in AppKit/SwiftUI component that lets you show a folder structure like this? Or do you have to create a custo one? I can't think of a way to look this up 🤔
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:
@cdfinder Totally. I just wonder how much does he really know about the current state. He’s not an engineer… so perhaps all he hears is that everything is going just fine?
Quite possible, yes. Maybe Timmy is simply looking at the numbers, and counting the money.
Somebody should really tell him about the lousy software quality of #macOS... #Apple
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
@krzyzanowskim@bgannin Do you mean NSTextView.isFieldEditor? AFAICT that doesn't change the selection style.
Incidentally, I checked out your STTextView, and it has the "replace" selection style of NSTextField rather than the "extend" style of NSTextView. Was this intentional?