In the current approach, I use an `NSTextView` in each block. This means, if you have two text blocks, there are going to be two separate `NSTextView`s.
This is problematic, as it’s really difficult to make keyboard navigation feel natural when navigating the caret between the two text blocks.
You know how when you use arrow up and down keys to navigate in some text, the x-position is remembered to ensure the caret stays in the same position on the horizontal axis.
I do have a solution that mostly work, but I have a bug where _(I think)_ it resets the x-position on each up and down click. Shouldn’t be too difficult to fix.
**However, there is another problematic issue:**
Another problem is text selection. Selecting text across two different `NSTextView`s must be faked, as it does not work by default, so I need to implement a custom solution.
**I see two options:**
- I can continue with the current approach of using separate `NSTextView`s for each block, but this requires much debugging and custom solutions. Maybe I will never be able to get it perfect 🤷♂️
- Or, I can pivot and use one single NSTextView which is apparently what Apple Notes is doing.
I’m not super familiar with `NSMutableAttributedString` and `NSAttributedString`, but apparently these allow for custom styling inside the same text string. For example, you can have a line with a bigger font size and then a line below with a smaller font size inside the same text paragraph.
You can even add attachments inside the text with `NSTextAttachment`. I think this should also work for checkboxes.
I will experiment with this new approach over the weekend. Hopefully, I can get something working. #dev #macOS #Swift #AppKit
I added a new image popup to my #macOS notes app 🚀
Simply click on an image, and it will open the image in a popup with a blurry and slightly dark background. I think it looks beautiful 🤩
Also added a subtle fade-out effect to the note content right below the tabs at the top.
Can't wait to begin working on the iPhone and iPad app, but there's still more to be done on the macOS version 💻
I still need to implemented the visual canvas functionality, which will be a major part of the app. I think it will be perfect for brainstorming and organizing notes.
The home tab also needs to be implemented. Right now, there’s just placeholder text. Still figuring out exactly what I want with it 🤔 #dev #Swift #AppKit
View quoted note →