spacestr

🔔 This profile hasn't been claimed yet. If this is your Nostr profile, you can claim it.

Edit
frederikhandberg
Member since: 2025-09-08
frederikhandberg
frederikhandberg 3d

Would also love a super easy way to mirror my Pubky content on other clients. Maybe this feature already exists.

frederikhandberg
frederikhandberg 3d

Need more clients than the official Pubky.app before I will be using it actively. Especially a mobile client would be great.

frederikhandberg
frederikhandberg 3d

After learning the shortcut `CMD + Shift + O` my #Xcode experience has improved significantly. It’s exactly like the `CMD + P` shortcut in #VSCode. Just a way to search for files to quickly open them.

#Xcode #xcode #VSCode #vscode
frederikhandberg
frederikhandberg 3d

🚨 I have an #AppKit pro tip for y’all that I just learned!!! 🚨 If you have an `NSView` above an `NSTextView` and you want to change `NSCursor` when hovering the `NSView` to something like `NSCursor.pointingHand`, you need to make sure you don't call `super.mouseMoved(with: event)`. If you call `super` on your `mouseMoved` event, it will override the `NSCursor` to the default. The default `NSCursor` for `NSTextView` is the `NSCursor.iBeam`, so you will experience the pointingHand to show very briefly, but then immediately be changed to the iBeam when you hover over the `NSView`. I have spent the past three hours trying to figure out a solution to the cursor flickering and I literally just fixed it. #dev #Swift #AppKit

#appkit #dev #swift
frederikhandberg
frederikhandberg 4d

I like for iOS. Not sure if I think it’s perfect, but it’s the best client I’ve found so far. Many of the other apps aren’t native apps. Instead they are made to support both Android and iOS using the same codebase. It’s very obvious for me to tell which apps are made in native UIKit and SwiftUI and which are Flutter.

frederikhandberg
frederikhandberg 4d

I assume this is a very well known bug, because it’s so obvious when typing a note.

frederikhandberg
frederikhandberg 4d

Haven’t used the client in a long time, but I just tried it out again. When writing a note, I noticed a bug where the caret will jump to the end whenever clicking return to make a line break. #Damus #bug

#damus #bug
frederikhandberg
frederikhandberg 4d

**Previous development update:**

frederikhandberg
frederikhandberg 4d

I FINALLY have `NSTextAttachmentViewProvider` working in my native #macOS notes app! 🎉 This means I can now display interactive #SwiftUI views inside an `NSTextView`. Notice how I’m embedding an image directly into the textview, which the user can click to show the image in a popup. It sure did take a lot of trial and error before I could get it working. I did try to use LLMs to help out, but they were hallucinating like crazy - this makes sense though. They learn from gathering data, but there really isn’t much data available online about `NSTextAttachmentViewProvider`. This is unfortunately the case with many of the #AppKit APIs… There just aren't that many resources to be found, which makes learning AppKit much harder compared to, for example, web development (at least I personally found web dev much easier to learn). **The problem I experienced:** The whole point of me trying to use the API, was because I needed to display a SwiftUI view containing an image directly inside an `NSTextView`. This is unsupported by the `NSTextAttachment` API. _Just to be very clear: Yes, I know that you can show an NSImage using `NSTextAttachment`, but you **CANNOT** show a SwiftUI image._ I tried to write some hacks to get it working, but then I learned about the newer API called `NSTextAttachmentViewProvider` which would allow me to do exactly what I wanted - to embed a SwiftUI image inside a textview. However, by using this new API, I had to migrate from `TextKit1` to the newer version `TextKit2`. The migration to the new `TextKit2` went fairly smooth, but getting the images to show correctly inside the `NSTextView` was quite the challenge 😅 My biggest problem was getting the size of the images to work. They seemed to be limited to the line height, which meant, the images couldn’t grow more in height than 32pts. **Re-rendering bug**: You'll notice in the video, that the images are showing the loading indicator very briefly whenever I hover over the heading blocks. This will be my next task to fix. **Hover effect bug:** There's also a problem with the text selection cursor showing even when I'm hovering over an image - it should change to the pointer cursor. It does actually change very briefly, but then changes back to text selection cursor again. #Swift #dev

#macos #swiftui #llms #appkit #swift
frederikhandberg
frederikhandberg 5d

If all you want to see is posts by nerds, then you’re in luck, because that’s the vast majority of what you’ll find on Nostr. But I’d like a wider variety in the content I find here. If the creators you think will flock to Nostr are “normal” people, then you need a reality check. Nothing against nerds. I’m very much a nerd myself, but it does get tiring seeing stuff from mostly like-minded individuals (except opinions on Primal vs. Damus and shit like that)…

Welcome to frederikhandberg spacestr profile!

About Me

23 🇩🇰 Studying for a degree in Software Engineering while building fun projects and working freelance as a News Photographer 📷 I share my software projects, photos and videos from my work as a news photographer, and progress updates as I learn to sew garments. Basically, I just write about my hobbies. frederikhandberg.com

Interests

  • No interests listed.

Videos

Music

My store is coming soon!

Friends