Dave Rahardja · @drahardja
1229 followers · 5686 posts · Server sfba.social

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!

humancode.us/2023/07/08/all-ab

#ios #iosdev #macos #maccatalyst #apple #xcode #swift #objectivec #UIKit #AppKit #programming

Last updated 1 year ago

Nathan Manceaux-Panot · @Cykelero
170 followers · 441 posts · Server mas.to

Did I just spend multiple days on centering toolbar items? Y-yeah. Turns out in an AppKit toolbar, either all items have a label, or none of them does. Setting an empty label leaves the view weirdly positioned.

The code is a big hack: it mutates AppKit-created constraints, finding them by item/attribute pairs. And to make sure the tweak re-runs whenever the toolbar item updates, I had to swizzle a method on the NSToolbarItemViewer private class.

But it works? 😅

#macos #swift #AppKit

Last updated 1 year ago

sandy · @sandyarmstrong
178 followers · 348 posts · Server hachyderm.io

Hey devs out there, you may have heard about how in Sonoma, NSView drawing will no longer clip to bounds by default? And looking at developer.apple.com/documentat , you may have thought to yourself: "No big deal, I'll keep building against an older SDK and these changes won't impact me for years"?

Well, you would be wrong.

#AppKit

Last updated 1 year ago

¡a!n · @iain
131 followers · 1414 posts · Server kolektiva.social

Anyone looking for a remote (UK based) or UI application developer? Experience of large, complex projects, , , , etc?

,

#mac #iOS #objc #swift #AppKit #swiftui #jobs #jobfairy

Last updated 1 year ago

Nathan Manceaux-Panot · @Cykelero
125 followers · 274 posts · Server mas.to

Just implemented some animations in @Retcon, and wanted to talk about an interesting little twist: animations don't always play, depending on how you interact with the app, and can also play at different speeds. It feels nicer that way!

#AppKit #macos #ux

Last updated 2 years ago

Nathan Manceaux-Panot · @Cykelero
125 followers · 274 posts · Server mas.to

Undo/redo code is error-prone. It's even trickier in @Retcon: the app doesn't just restore previous states as-is, it also *merges in* external changes (you can modify your workdir at any time!).

So during integration tests, every single undo state is checked: the test undoes repeatedly, running original asserts each time, then does the same for redo.
To make this effortless to implement, I wrote UndoAssertManager. Boom, bulletproof undo support :)

gist.github.com/Cykelero/fa4a8

#xcode #swift #AppKit

Last updated 2 years ago

Nathan Manceaux-Panot · @Cykelero
121 followers · 236 posts · Server mas.to

I wrote this tiny AppKit extension to make it easier/safer to switch over the response of a NSAlert.
Refer to your buttons explicitly, instead of using alertFirstButtonReturn, where you can break behavior by mistake when later reordering buttons.

(screenshots are before, after, and extension source)

Source: gist.github.com/Cykelero/1ff3a

#swift #AppKit

Last updated 2 years ago

Kuba Suder · @mackuba
185 followers · 480 posts · Server bitcoinhackers.org

Ok, it took me a few days, but I have the whole Twitter & Mastodon OAuth flow and account persistence mostly done 😎 Next: the new post window :]

(I don't know yet if I'll actually be able to release this, because it depends on what Lord Elon decides about the API :D)

#macdev #AppKit

Last updated 2 years ago

Eric Vitiello · @pixel
1720 followers · 2282 posts · Server social.pixels.pizza

Learn how to use DateFormatter to parse, format, and extract components from Dates.


advancedswift.com/date-formatt

#AppKit #UIKit #iOS #macOS #programming #swift

Last updated 2 years ago

Kuba Suder · @mackuba
172 followers · 364 posts · Server bitcoinhackers.org

Hey Mac devs! Does anyone have experience with single-column, AutoLayout-driven NSTableView where cells may contain NSImageViews with possibly large images? Kind of like in Twitter/Mastodon client apps? 🙃

I have a problem that the image views expand the cells beyond the edge of the table view/window. I tried various approaches, but I can't get it to look right in every case.

How can I solve this (without resorting to full manual layout)? github.com/mackuba/TableViewCe

#macos #AppKit #cocoa #macdev

Last updated 2 years ago

Collin Donnell · @collin
1051 followers · 1518 posts · Server ruby.social

I am bought in on for apps. It’s pretty great. I also still like and .

I am large, I contain multitudes.

#swiftui #ios #uikit #AppKit

Last updated 2 years ago

Hendrik · @HendrikLinde
6 followers · 55 posts · Server indieweb.social

@collin I tried to start with in my existing project, but was not successful. I guess my project is too old or something. Sticking with which is working fine, except for doing translations, which is a drag.

#AppKit #swiftui

Last updated 2 years ago

Collin Donnell · @collin
955 followers · 1245 posts · Server ruby.social

The new projects I’m working on are all , and so far it’s pretty nice. I would still default to on , but for iOS it’s working fine. I still suck at layout with it, but I’ll get there.

#swiftui #AppKit #macos

Last updated 2 years ago

Kuba Suder · @mackuba
128 followers · 195 posts · Server bitcoinhackers.org

One of those moments in programming when you need to get up from the keyboard and grab a pencil… 🤔

#nstableview #macdev #AppKit

Last updated 2 years ago

Rafa · @rafa
1702 followers · 845 posts · Server mastodon.design

Googling is giving me ZERO results, any dev out here knows what these logs could be related to? They happen when the camera freezes when using Hand Mirror…

What the hell is "RelayServiceClient"? 😅

#macos #AppKit #swift

Last updated 2 years ago

NMDoerner · @cdfinder
54 followers · 169 posts · Server techhub.social

Another horrible in and

What do you think, will it beep or not?

Let me tell you, it WILL beep.

And the reason is a sloppy and undocumented change made by in macOS 12, but they completely forgot to actually test and finish properly.

Took us almost a whole day to find and fix it. ARGH.

That is the kind of crap we have to deal with every year, for every new major macOS release.

Things that were stable and worked as documented for 30 years suddenly break. ARGH.
It is so frustrating.

#macos #AppKit #bug #macOS12 #macOS13 #Apple

Last updated 2 years ago

Arcticulate · @Arcticulate
1 followers · 108 posts · Server toot.community

So … I’ve been trying out AppKit for several weeks now: medium-sized fragments at a time — sometimes just small pieces of code. I am starting to get a clearer view of the advantages and disadvantages of vs for every time I attempt to design a new dialog window (aka ”screen”). The way I do this is through XIB files. Some people might recommend against it, as it’s an old-school approach to AppKit UI design. I like it much better than storyboards, but both methods work fine.

#AppKit #swiftui

Last updated 2 years ago

Swift Dev Journal · @swiftdevjournal
58 followers · 24 posts · Server mastodon.world

Do you want to make Mac apps?

Are you having trouble finding learning material?

I put together a list of Mac development materials:

swiftdevjournal.com/resources-

There are books, videos, and blogs for both SwiftUI and AppKit along with places to ask questions.

#macdev #swiftui #AppKit

Last updated 2 years ago

Swift Dev Journal · @swiftdevjournal
224 followers · 85 posts · Server mastodon.world

Do you want to make Mac apps?

Are you having trouble finding learning material?

I put together a list of Mac development materials:

swiftdevjournal.com/resources-

There are books, videos, and blogs for both SwiftUI and AppKit along with places to ask questions.

#macdev #swiftui #AppKit

Last updated 2 years ago

Brentley Jones :bazel: · @brentley
151 followers · 217 posts · Server hachyderm.io

I’ve never written code before, only . I also stopped being an app developer before Catalyst and hit the scene. So I’m sorry ahead of time if I end up fawning too much over how easy it is to get a multi-platform app up and running with SwiftUI.

#AppKit #UIKit #swiftui

Last updated 2 years ago