Configuring Subviews In Collection View Cell After The Init CallIn some cases, you may need to add and configure subviews in a UICollectionViewCell’s custom configure method that gets invoked outside of the cell’s init. For example, suppose you are configuring a sOct 17, 2024 · 2 min readyoursswiftly.hashnode.dev
Swift Interviewing Syntax TipsI’ve spent some time recently preparing for and completing a few rounds of interviews in Swift. Along the way, I learned a couple syntax tricks that can help simplify code and save time. Tip #1: Convert strings to character arrays for easier indexing...Apr 16, 2023 · 2 min readyoursswiftly.hashnode.dev
Defensive ProgrammingDefensive programming is the philosophy of promoting bug-resistant code practices, specifically by prioritizing readability and predictability. On my previous team, we also emphasized code approaches that minimize human error. This is especially impo...1TJan 2, 2023 · 2 min readyoursswiftly.hashnode.dev
Converting Non-trailing Closures to TrailingWhile addressing SwiftLint errors, a common error I’ve encountered is the trailing_closure violation, which dictates that the trailing closure syntax should be used whenever possible. I wanted to share a few examples here of converting non-trailing c...Oct 4, 2022 · 2 min readyoursswiftly.hashnode.dev
Clean Coding in SwiftOne of the most satisfying things as a developer is seeing a verbose piece of code get converted to a cleaner, more elegant variation of what it was before. I love when teammates make these types of suggestions on code reviews, and wanted to share a ...Aug 21, 2022 · 2 min readyoursswiftly.hashnode.dev