TextField Recommendations / Autocomplete – SwiftUI macOS and iOS

Another weekend, another set of improvements for MarsManaged. This time, I focused on adding an autocompletion feature for Tags. Let me provide some context first… In MarsManaged, cards may be linked to one or multiple tags. In the below example, the “Welcome to MarsManaged!” card is linked to the tag “Samples” (yellow arrow).  To link one …

Expanding TO-DO views for MarsManaged

This weekend I continued working on the TO-DO area, specifically on bringing the context-aware functionality of Cards to “Target Date” & “Last Modified” views.  As most of the code complexities were sorted last weekend, this one I did quite a bit of progress. Here’s the latest: “Sort by Target Date” view:   “Sort by Last …

Working on all new TO-DO views for MarsManaged

This weekend I focused on the TO-DOS view of MarsManaged. Instead of a list, as I originally developed it, working on having multiple context-aware options. In the example below showing the ’Sort by Card’ one, seems to me this makes this view a lot more useful than a list?  In light mode: And dark mode: …

Making an editable Label with SwiftUI

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 …

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 …

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. …

Struggling with a basic macOS SideBar, RowList & DetailView app in SwiftUI

Its amazing how fast you can prototype in SwiftUI, it seems like magic. At the same time, when you start to get into the details, it can be infuriating…  Let me explain… After completing the prototype last week and deciding on the key features for the app  I started implementing them. One of the very …