blog.iankulin.com

Posts

Project 12 Feedback

I compare my solutions with Paul’s video for a SwiftUI challenge built around FilteredList, covering passing a predicate as a string, converting to enums, and adding sort descriptors. The enum task matched Paul’s exactly, while sort descriptors caused some struggle with NSSortDescriptors until I spotted the hint to use SortDescriptor instead...

You Can Take Big Steps When You Feel Safe

Day 58 of the 100 Days of SwiftUI series covers one-to-many Core Data relationships, using constraints and merge policies to handle conflicts, and underscore syntax for accessing wrapped properties in dynamic filtering. I reflect on Core Data’s pre-SwiftUI complexity, credit Paul Hudson’s teaching style with making the difficult material manageable, and consider how much harder the same functionality would be with raw SQLite...

CoreData and the Preview

My CoreData project from Day 53 of the 100 Days of SwiftUI course ran fine in the simulator but crashed in Xcode’s SwiftUI preview, which lacked a managed object context. I describe a workaround I found on the Hacking with Swift forums for supplying a context to the preview...

Top Four Reasons why @TwoStraws is a Good Teacher

I reflect on what makes the 100 Days of SwiftUI course effective as a teaching resource: its true/false comprehension questions, carefully pitched difficulty, hands-on learning in context, and the instructor’s knack for anticipating how beginners think. I also praise how reliably the course content stays up to date despite the rapid pace of change in Swift and SwiftUI...

Git - make all the commits into a single commit

After following along with an app tutorial, I want to collapse all the small commits made along the way into one before pushing the project to GitHub. The solution, borrowed from a Stack Overflow answer, skips rebase and squash tricks entirely: delete the .git directory, re-initialize the repository, and make a single fresh commit...

Day 47 - Habits App

I wrap up my Habits app as an MVP, the first of my own apps I have actually installed on my phone, after 120 days on the 100 Days of SwiftUI course with only day 47 completed. Possible future features include setting habits due at a specific time, like 6pm, rather than a fixed interval after the last completion. A growing backlog, including a custom picker for a times table app, remains deferred...

Updating stored JSON due to a struct change

A short walkthrough of migrating persisted app data in a Swift app after changing a Codable struct: I copy the old struct under a versioned name, and init() attempts to decode saved JSON with the new model first, falling back to the old one and converting items across. I note the migration code is deliberately messy and temporary, since the app only exists on my phone and a couple of simulators...

List Apps

Reflecting on the Day 47 habit-tracking milestone challenge, I observe that simple SwiftUI list apps follow a common recipe: Identifiable/Codable structs, an ObservableObject collection with @Published state, and a List inside a NavigationView. I outline that pattern, its benefits for building quality apps quickly while staying HIG-compliant, and the risk that such apps end up looking and feeling like every other list-based offering...

When it Works

A short reflection on what makes coding enjoyable: the steady stream of small problems to solve on the way to a bigger goal. I note the urge to build a simple drawing app hits in every new language I learn, from Visual C++ and MFC to SwiftUI...

Musings on Data

Losing some enthusiasm for my online SwiftUI course, I weigh starting on app ideas from my notebook instead. The main gap in my knowledge is data persistence, so I consider the options: Core Data with CloudKit, Firebase, or simply writing files to the app sandbox, noting that a background in large relational databases means adjusting my thinking for small-scale apps. Whether to push on with the course or start building is left undecided...

Using AI to Generate Icons

After hiring a designer on Fiverr for CodeTrimmer icons, I try generating them locally with DiffusionBee, a free Apple silicon build of Stable Diffusion, on an M1 MacBook. I show outputs for a scissors-over-code prompt, note the permissive CreativeML Open RAIL-M license, and observe that prompt-writing is a skill, with results good enough for toy apps or as starting points for design ideas...

Color Picker (website)

A short note on using ImageColorPicker, a browser-based tool for identifying colors in an image, while recreating a designer-provided UI in SwiftUI. The site returns RGB values out of 255, which I divide by 255 to get the CGFloat values required by SwiftUI’s Color initializer...

Design Help

Frustrated with the design of my Times Table app, I hired two UX designers through Fiverr to redesign it with kids in mind. I share both drafts and give feedback on each — layout, colors, how to show right and wrong answers — and consider which elements I could realistically implement with my current iOS skills...

Calculator

While building a calculator-style answer keypad for a multiplication tables practice app, I follow an iOS Academy video that recreates the iOS Calculator in SwiftUI and enjoy spotting edge cases the tutorial’s quick implementation leaves unhandled. I also reflect on copying existing Apple apps as a way to skip design work, and on wanting to improve at design over time...

Gitting up to date

I explain how to bring a feature branch’s changes back into the main branch, comparing merge, squash merge, and rebase with example commit histories. I close with a note on why rebasing commits that have been pushed to a shared repository is considered bad practice. Branching per feature is part of my effort to become more competent with git...

iOS Academy

I briefly recommend Afraz Siddiqui’s iOS Academy YouTube channel, which features iOS development tutorials, including shorter focused videos such as one covering the new SwiftUI chart views...

Animation Feedback

A short comparison of two solutions to the Guess The Flags animation challenge: my approach of storing animation amounts in an Int array versus Paul’s more concise use of ternary operators in the modifiers. Both vary the effect depending on which flag was selected, but Paul’s version needs considerably less code...

Gists for embedding code

I describe using GitHub Gists to embed code snippets in WordPress posts, a simpler alternative to the WordPress code blocks I complained about previously. Pasting a Gist URL into WordPress renders it as a formatted code block, which I demonstrate with a Swift example...

Wordpress Code Blocks

I compare ways of displaying Swift code snippets in WordPress posts, including the default code block, the paid SyntaxHighlighter block, screenshots, pasted rich text, and raw HTML, aiming for Xcode-style syntax highlighting. Citing Paul Hudson’s site as the ideal, I conclude that a proper solution would require better HTML and CSS skills than I currently have...

How to upgrade XCode and Swift

A short note on updating to Xcode 14 and Swift 5.7: the update is found in the Mac App Store rather than Xcode’s About dialog. I also show how to check your current Xcode and Swift versions, both through Xcode’s project settings and via the command line, and link elsewhere for details on what’s new in each release...