marioguzman, to macos
@marioguzman@mastodon.social avatar

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.

#AppKit #NSDrawer #macOS #MacOSX #Macintosh

marioguzman, to random
@marioguzman@mastodon.social avatar

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.

https://developer.apple.com/documentation/appkit/nsview/1483410-acceptsfirstmouse

krzyzanowskim, to random
@krzyzanowskim@mastodon.social avatar

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

chucker, to random
@chucker@norden.social avatar

Oooh, another #AppKit Mastodon client.

cdfinder, to macos
@cdfinder@techhub.social avatar

Today I learned about the healing power of

[attributedString removeAttribute:@"NSOriginalFont" range:fullStringRange];

And I was wondering why the hell macOS was drawing my string in the totally wrong place.

What the hell are they doing these days?

anosidium, to macos

Today, I am excited to reveal that my macOS Mastodon client is called Oliphaunt and here is the public TestFlight link: https://testflight.apple.com/join/QLqIRNwe

Please remember that it is a beta, so it is a work-in-progress and expect some bugs here and there. Some features are not fully implemented and I am aware of some of them and probably forgot others. 🤭

I would really appreciate your feedback. Please share your feedback on GitHub, https://github.com/anosidium/Oliphaunt-Feedback-And-Support

#Oliphaunt #macOS #Swift #AppKit #SwiftUI

mackuba, to random
@mackuba@martianbase.net avatar

I managed to implement NSTableView row reordering - was a bit harder than I'd expect, but this blog post was pretty much copy-paste what I needed: https://samwize.com/2018/11/27/drag-and-drop-to-reorder-nstableview/
#MacDev #AppKit

Short video of reordering accounts on the list in a Mac app preferences window by dragging them up or down

drahardja, to iOS
@drahardja@sfba.social avatar

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?

#ios #uikit #swift #appKit

onegeekarmy, to swift
@onegeekarmy@mastodon.social avatar

#AppKit #swift and #xcode people, I have a puzzling issue in Sonoma.

I have an NSTextView inside an NSScrollview. I load about 800 KB of text data in the text view.

Scolling is slow and choppy.

I click the "Debug View Hierarchy" button in Xcode. I then press the "Continue Program Execution" button (without doing anything else).

My text now scrolls smoothly in its scroll view.

Any idea what is going on? What does the view hierarchy debugger turn on that makes my view useable?

marioguzman, to SwiftUI
@marioguzman@mastodon.social avatar

I really wanted to make PDX Transit a purely SwiftUI app but I gave in and decided to jump down to AppKit for certain things like NSTextView.

I guess I was stupid to think I could do it without AppKit but also trying to come to terms that this is also okay to do.

#AppKit #SwiftUI #macOS

rafa, to macos
@rafa@mastodon.design avatar

Is there a Notification I can observe to be alerted when the user changes the selected audio input device on #macOS?
#AppKit #swift

anosidium, to macos

I’ve been working on a new macOS app, it’s a Mastodon client! I started it in January and went full development from July onwards. The client is made specifically for the Mac, conforming to the design language very seriously. I aim to make it a true Mac app with platform-specific features. Here is a screenshot, what do you think?

#macOS #Swift #AppKit #SwiftUI #MastodonClient

ctietze, to SwiftUI
@ctietze@mastodon.social avatar

After my pro-#SwiftUI rant earlier today, I went into the opposite direction -- instead of denying reality, I found a small thing that was quite ok once I stopped fighting the old ways again:

📝 Embracing the #AppKit Ways
https://christiantietze.de/posts/2023/11/embracing-the-appkit-ways/

kn, to macos

The macOS Ventura System Settings has one of the strangest text fields I've ever seen in macOS. Why is it... right-aligned?

A screen recording of me typing into a right-aligned text field. Looks bad

marioguzman, (edited ) to Mac
@marioguzman@mastodon.social avatar

I've decided to take the old #Macintosh HIGs & merge them into one large collection of topics while modernizing them in the process.

The original #HIG would give actual examples w/ usable metrics & mention possible exceptions to the rule. The incredible level of detail gave developers the guidance to create delightful UI users have come to expect from their #Mac.

Here is my first topic: Layout Guidelines

#macOS #design #AppKit #SwiftUI

https://marioaguzman.github.io/design/layoutguidelines/

chucker, to random
@chucker@norden.social avatar
ctietze, to SwiftUI
@ctietze@mastodon.social avatar

It's really tough to go back from months of using #SwiftUI almost exclusively to wiring #AppKit components and getting layout right.

mackuba, to random
@mackuba@martianbase.net avatar

Argh… so I wasted 2+ hours and a lot of mental energy just to discover that NSTabViewController doesn't do the crossfade animation that's enabled on the storyboard, because that checkbox just doesn't work and it works fine if I simply set that same property in code… yay #AppKit #MacDev 😑

(If you tell me I should not be building the UI with storyboards, I will turn into a gremlin 👿)

chucker, to SwiftUI
@chucker@norden.social avatar

“I know! This time, I’ll use #SwiftUI instead of #AppKit.”

Step one: “Build for Previews” fails even though regular builds do not.

Step two, after a workaround: “LinkDylibError: Failed to build Foo.swift

Linking failed: no such file or directory”

🫠

(This app cleans, builds, runs, debugs. Unit tests pass. But do SwiftUI Previews work? Not any more, no.)

chucker, to random
@chucker@norden.social avatar

#AppKit #AutoLayout

(I fixed something by making a separate test project, but still don’t fully understand why it now works and didn’t before)

It's a meme GIF of Peter Griffin from Family Guy trying to fix window blinds and growing increasingly frustrated. Usually used for CSS; in this case, for AppKit Auto Layout.

chucker, to random
@chucker@norden.social avatar

So I made a little AppKit wrapper for SwiftUI Previews (it seems this isn’t even needed any more in Xcode 15?), based on https://www.swiftjectivec.com/using-xcode-previews-for-uikit/, which did it for UIKit.

This works! Slow (even on M1 Pro), but neat.

But, no debugger. (Apparently, this was removed in Xcode 13?) Which is odd, since unit tests do have a debugger?

So, what’s everyone doing to isolate the behavior of a view controller and mock/test/debug it, aside from a lot of print() calls?

#AppKit #Xcode

Xcode. on the left, Swift code that initializes an Xcode Previewer for an AppKit view controller, and on the right, that previewer (which, as intended, just shows a dummy red rectangle)

chucker,
@chucker@norden.social avatar

So, thirty-thousand print calls later, I get far along enough that the UI I’m trying to preview… briefly flashes then disappears.

The print calls suggest that my view controller gets instantiated multiple times, and I’m guessing that causes a race condition with the callbacks that ultimately fill a table view inside the view with data.

I might also be implementing NSViewControllerRepresentable wrong?

(Also, it appears I can only use the new Preview macro if I target macOS 14?)

#AppKit #Xcode

stesaa, to SwiftUI

Ducklet 1.0 is live on the Mac App Store!

Ducklet is the fast, native SQLite database editor for macOS.

Try it out: https://ducklet.app

Built with #swiftUI and #AppKit for #macOS

marioguzman, to random
@marioguzman@mastodon.social avatar

I can't decide which Tab View I like more... they're both gorgeous in their own way... 😭

#cocoa #macosx #aqua #appkit

nsscreencast, to SwiftUI

Building a SwiftUI Mastodon Client with macOS

The 17 part series is complete! This was was such fun to make, and I want to thank @_inside for joining me! 💜

This series covers using #SwiftUI and #AppKit together to build a "real” app. It includes networking, JSON parsing, windowing, SwiftUI lifecycle, integration with NSViewRepresentable, keyboard shortcuts and much more!

https://nsscreencast.com/series/61-macos-mastodon-client

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • mdbf
  • ngwrru68w68
  • tester
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • megavids
  • tacticalgear
  • osvaldo12
  • normalnudes
  • cubers
  • cisconetworking
  • everett
  • GTA5RPClips
  • ethstaker
  • Leos
  • provamag3
  • anitta
  • modclub
  • lostlight
  • All magazines