Frederik Handberg's Avatar

Frederik Handberg

@frederikhandberg.com

πŸ‡©πŸ‡° 23. Studying for a degree in Software Engineering, while working as a Freelance News Photographer. I'm also learning to sew garments...

49
Followers
45
Following
253
Posts
11.02.2024
Joined
Posts Following

Latest posts by Frederik Handberg @frederikhandberg.com

But I’m happy with how this feature turned out! πŸš€

05.03.2026 20:03 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

I will probably lower the opacity of the sidebar overlays just a bit, so they match the appearance of the app with the translucent blurry background. Because right now, I don’t think the dark solid background color of the sidebar overlays match the app’s appearance.

05.03.2026 20:03 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Video thumbnail

I just finished working on a sidebar overlay for the notes app I'm building πŸ’»

When hiding a sidebar, the user can now move their cursor to the edge of the window, to show an overlay of the sidebar. I think it looks nice the way it slides out. #dev #macOS

05.03.2026 20:03 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Video thumbnail

Finished the tooltip for the notes app πŸš€ #SwiftUI #AppKit

03.03.2026 20:16 πŸ‘ 4 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

Worked on a color picker today for my notes app.

It's fully functional, except for the alpha/opacity slider. After that's implemented, I'll work on making the UI look nice.

#dev #macOS #Swift #SwiftUI #AppKit

26.01.2026 22:46 πŸ‘ 3 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

This is currently implemented for image blocks, normal text blocks, and headings - so I still got a few more blocks to work on...

Next task will be getting it to work in list blocks.

23.01.2026 18:10 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

I just implemented a very essential feature in the notes app I'm building 😁

It's now possible to rearrange blocks by moving them up and down. Added two options to the context menu that appears when right-clicking a block: "Move Up" and "Move Down".

#dev #macOS #AppKit #Swift #SwiftUI

23.01.2026 18:09 πŸ‘ 5 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Next task: Currently the user must drop directly over a folder to relocate. Instead, dragging over a folder’s contents should highlight the parent folder’s background and allow the user to drop the dragged file or folder to relocate it.

20.01.2026 11:05 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Video thumbnail

Files and folders can now be relocated by drag and drop.

Would be cool to have an animation that shows the files being moved from one folder to another. Something I could work on in the future...
#dev #macOS #Swift #SwiftUI #AppKit

20.01.2026 11:05 πŸ‘ 4 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Also, I have worked on making a small preview overlay that appears when hovering notes. It's not quite done yet. Still need to work on the UI of it, but I think it's pretty nice.

18.01.2026 00:20 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Bookmarks are saved locally on the user's device in a file called `bookmarks.json` located in the hidden folder `.space/`.

18.01.2026 00:20 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Video thumbnail

I have now finished implementing support for adding and removing note documents as bookmarks.

The user can simply right-click a note and then select the option called 'Bookmark'. #dev #macOS #AppKit #SwiftUI

18.01.2026 00:20 πŸ‘ 3 πŸ” 0 πŸ’¬ 5 πŸ“Œ 0
Code block in notes app

Code block in notes app

I just finished implementing code blocks in my notes app πŸš€ #dev #macOS #Swift #AppKit

22.12.2025 23:13 πŸ‘ 3 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

I finished drafting my t-shirt pattern in CLO3D and got it printed.

Now I need to trace it onto real pattern paper.

12.12.2025 00:17 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

In the video, the red borders show the boundaries of each text view. Notice how I'm able to move between them seamlessly, as if it were one continuous editor.

08.12.2025 20:55 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

My solution lets the user move the caret smoothly between text views just by using the arrow keys. On top of that, the implementation also supports making text selections across text views.

The user can even copy text from a selection that spans multiple text views.

08.12.2025 20:55 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

The problem is that by default #macOS doesn't natively support caret navigation or text selection across multiple text views. This would be a big problem for the user experience in my app, so I had to build a solution!

08.12.2025 20:55 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Video thumbnail

For the past month or two, I've been working on some pretty complex logic to support caret navigation and text selections across multiple sequential `NSTextView`s in #AppKit.

I need this functionality for my block-based notes app, where each block lives inside its own text view. #dev

08.12.2025 20:55 πŸ‘ 1 πŸ” 0 πŸ’¬ 2 πŸ“Œ 0
GitHub - indragiek/INDSequentialTextSelectionManager: Sequential text selection for NSTextViews Sequential text selection for NSTextViews. Contribute to indragiek/INDSequentialTextSelectionManager development by creating an account on GitHub.

Luckily, I figured out a solution based on `INDSequentialTextSelectionManager`.

GitHub repository:
github.com/indragiek/IN...

26.11.2025 14:34 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

An example of this is text selection:

The problem with having separate and independent text views is that selecting text across multiple `NSTextView`s is not natively supported.

26.11.2025 14:34 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Though, I’m not saying that having separate text views is solving all problems, because it does indeed create its own set of problems that must be fixed to ensure a good user experience.

26.11.2025 14:34 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

I have tried to combine all block types in a single `NSTextView`, but it gets problematic converting the JSON structure to `NSMutableAttributedString` because the ranges gets screwed up very easily.

26.11.2025 14:32 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

I’m building a block-based notes app.
My idea was to have a separate text view for each block type.

For example, a heading block would have its own text view.
Likewise, a normal paragraph block would also have its own text view.

26.11.2025 14:32 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
Building a rich text editor for UIKit, AppKit and SwiftUI In this article, we’ll look at how to extend the rich text support in UIKit, AppKit & SwiftUI by extending native types, adding new t...

This article has been really helpful for me to learn how `NSTextView` works:

danielsaidi.com/blog/2022/06...

If you're new to #AppKit and need to build something that requires using text views, I'd recommend giving it a read.

22.11.2025 21:04 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

I love that #programming is all about problem solving. That’s what makes it so fun. At the same time, it can also be a disadvantage. Sometimes, I’ll run into a bug and spend days trying to solve it. This can be super frustrating 😫 But then it finally works, and the adrenaline kick feels amazing πŸš€

22.11.2025 20:47 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
GitHub - indragiek/INDSequentialTextSelectionManager: Sequential text selection for NSTextViews Sequential text selection for NSTextViews. Contribute to indragiek/INDSequentialTextSelectionManager development by creating an account on GitHub.

However, now I just found a #GitHub repository that might be a solution:
github.com/indragiek/IN...

It's old and uses Objective-C, but Sonnet 4.5 should be able to help port it to Swift.

22.11.2025 20:45 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

This led me to implement a different solution where I used a single `NSTextView` for all blocks rather than separate.

22.11.2025 20:45 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

My previous approach for the editing experience in my notes app was using multiple independent `NSTextView`'s.
This caused a problem where I was unable to perform text selection across multiple blocks, since the blocks were in separate `NSTextView`'s.

22.11.2025 20:45 πŸ‘ 2 πŸ” 0 πŸ’¬ 2 πŸ“Œ 0

This is obviously part of learning, but it still sucks when you think what you just made is really good, and then it turns out it has massive flaws because you just didn’t know any better πŸ˜…

20.11.2025 16:20 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

For example, with the notes app I’m building, I’m making so many assumptions about how things should be done. And I’ve had to redo implementations again and again because I realized my approach was bad.

20.11.2025 16:20 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0