Let’s say you’re showing the user a list of sidebar selectable categories. These categories appear on the sidebar as SwiftUI Labels and, depending on the one selected, the app will show one view or another. So far, so good… But what if the user would like to rename one of the categories? Ideally Label would have …
Category Archives: development
Iterating on MarsManaged Palette & Icon – First Round
With MarsManaged edging closer to feature-complete, today I took some time to start iterating over color palette & icon concepts. First, lets talk about the palette: The premise of the app is that you’ll be as productive as future martian generations will be. With that in mind, when it comes to the color palette of …
Continue reading “Iterating on MarsManaged Palette & Icon – First Round”
Using NSTextView in SwiftUI
MarsManaged is built on SwiftUI. At the time of this writing, November 2021, SwiftUI is still quite new and catching up to AppKit/UIKit capabilities. As many early adopters, I found myself in a situation where a key feature I wanted to build for the app was not feasible using only SwiftUI views. I needed good …
MenuBar Items in SwiftUI
Before SwiftUI you would easily add, change or remove menuBarItems from your app Storyboard. With the transition to SwiftUI however, there’s no longer a StoryBoard file to edit… So, what now? After the initial surprise, and having spent a few hours reading documentation… It’s actually a very straightforward three step process: 1. In your @main …
Preventing edits in TextFields unless cell is selected
For the ToDo section in MarsManaged, the goal is for the user to see and quickly manage their upcoming tasks. The user should be able to easily tweak bookmarked tasks, set target dates, complete or delete them. Now, given that each cell is composed of multiple editable TextFields, it’s important to prevent unintended editing on …
Continue reading “Preventing edits in TextFields unless cell is selected”
SwiftUI modifier order matters
This Sunday I spent pretty much all day working on MarsBased. I woke up early, went to the gym, made myself some coffee and got to work. In front of me was a prioritized list of “feature enhancements” my wife had prepared for me -she’s an excellent Product Manager so she always has great feedback- …
NewsWave for Mac 2022.0 (macOS Monterey compatibility update)
Today was Keynote day! And what a day, the new MacBook Pro’s look amazing and we have release dates for macOS Monterey, just a couple days out! With that in mind I’ve submitted a compatibility update for NewsWave for Mac, version 2022.0. No fancy new features today, this update focuses on compatibility and addresses a couple …
Continue reading “NewsWave for Mac 2022.0 (macOS Monterey compatibility update)”
Using NSSortDescriptor to sort Dates and nil values
Today I’ve been working on sorting tasks, as I’m using swiftUI and CoreData I use a FetchRequest with the following SortDescriptor: NSSortDescriptor(keyPath: \Task.targetDate, ascending: true) The idea being it will sort based on the task due date from smallest to the largest, meaning you’ll see the ones you should act on first at the top. …
Continue reading “Using NSSortDescriptor to sort Dates and nil values”
Multiple Word, Random Order Search – CoreData & SwiftUI
Today I worked on the search functionality for the upcoming Product Management app. Given that this app will contain lots of long notes, having good search is essential. In most cases & for most apps, a simple one to one comparison will do the job great -like in the above image-. Here’s how a predicate implementation …
Continue reading “Multiple Word, Random Order Search – CoreData & SwiftUI”
Counting CoreData entries based on relationship entities
As I continue working on the new product management app, I was trying to get a quick CoreData count. To be precise, I needed to get the count for how many of its relationships met a given criteria. There’s quite a few approaches but none as clean as “the filter”: Using it for boolean arguments: …
Continue reading “Counting CoreData entries based on relationship entities”