drahardja, to random
@drahardja@sfba.social avatar

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.

https://collindonnell.com/mvc-isnt-mvc

drahardja, to iOS
@drahardja@sfba.social avatar

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

#iOS #iOSDev #macOS #MacCatalyst #apple #Xcode #Swift #ObjectiveC #UIKit #AppKit #programming

chucker, to random
@chucker@norden.social avatar

Is there some Apple HIG guidance on choosing colors based on ‘distance’ (contrast-ish)? Something like

 static let palette = [NSColor.systemOrange,  
 NSColor.systemBlue,  
 NSColor.systemYellow,  
 NSColor.systemMint,  
[..]  

#MacDev #AppKit

(A bit surprisingly, Finder’s default Tag colors seem… poorly chosen in that regard?)

chucker, to random
@chucker@norden.social avatar

Anyone use https://github.com/tuist/tuist in lieu of a native .xcodeproj? I mainly ask because git merge flows are painful with the latter format. Too many conflicts that result from irrelevant internals.

#AppKit #Xcode

krzyzanowskim, to programming
@krzyzanowskim@mastodon.social avatar

Added working "Spelling & Grammar" to https://github.com/krzyzanowskim/STTextView over the weekend.

That was fun:

✔ Use 3yo "modern" NSTextCheckingController API with 0 documentation, and nobody seems to use it - "About 22 results" results in Google.

✔ disassemble AppKit to understand how it works

#macdev #appkit #appledev #programming

image/png

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

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

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/

mackuba, to random
@mackuba@martianbase.net avatar

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…) 🤨

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

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.

cdfinder, (edited ) to apple
@cdfinder@techhub.social avatar

Thank you, , for NOT making MKMapFeatureAnnotation available in .

WTF?

What are they doing?
This is so frustrating...

Seriously, Tim, if you are not interested in macOS anymore, place it in a new separate company that may actually work on it, and fix the bugs...

marioguzman, to random
@marioguzman@mastodon.social avatar

macOS Sonoma AppKit + SwiftUI introduced a new API for Split View Controllers where the trailing sidebar is can have an "inspector" style -- like Xcode. I just introduced it to my app with minimal change to adopt the new full-height look. This is what it looks like:

#WWDC #WWDC23 #AppKit #macOSSonoma

davidbures, to SwiftUI
@davidbures@mstdn.social avatar

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 🤔

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.

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

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

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?

martind, to random
@martind@mastodon.online avatar

Lo and Behold. There is no 'acceptsFirstResponder' in UIKit. but we do have 'canBecomeFirstResponder'.

What a lovely world.
#appkit #uikit

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 macos
@marioguzman@mastodon.social avatar

Sheets!

Sheets in Mac OS X had such a lovely animation presentation.

They'd come out from a "slit" between the titlebar and the toolbar. You can even see the slit. It was so neat.

And of course the "Slit" would go away when the sheet would retract as you'd dismiss it.

The often reminded me of a page coming out from a printer (much faster of course). I miss the playfulness of Mac. :(

mackuba, to random
@mackuba@martianbase.net avatar

There's some weird stuff with NSApplication activation in the #AppKit release notes: #WWDC23 #MacDev

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.)

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

humblehacker, to macos

I noticed some inconsistency in 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 vs , but after many experiments I don't think so.

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