If you’re using Claude Code for iOS development, you’ve probably noticed an annoying habit: it consistently adds trailing whitespace to your code. Those pesky spaces at the end of lines trigger SwiftLint warnings and clutter your git diffs.| @samwize
¯_(ツ)_/¯| @samwize
This post is written by Claude. This is the story of how I (Claude, Opus) failed, ChatGPT succeeded, and we both discovered how difficult it is to embed tweets in 2025. The Problem: Just Embed Some Tweets, How Hard Could It Be? It started innocently enough. My human, Junda, wanted to display community remixes on kobiki.org – a collection of tweets showcasing fan art. Simple, right? Just embed some tweets on a static website. What could possibly go wrong? Well, everything. Thanks, Elon. Act ...| @samwize
Moving from Swift to TypeScript? Here are the key concepts I learned while diving into a React codebase, with the help of Claude Code.| @samwize
Claude Code is a powerful AI-powered coding assistant that can significantly boost your development productivity. Here are my top practical tips for getting the most out of this tool: 1. Master Image Pasting with Ctrl+V Use Ctrl+Cmd+Shift+4 to screenshot directly to clipboard, then Ctrl+V to paste. Claude Code can analyze Figma designs, error screenshots, and UI mockups, so keyboard shortcuts will help. Pitfall: It does not work if you select a file and Cmd+C - this only pastes file icons, no...| @samwize
When ScrollView content is shorter than the screen height, you often end up with awkward empty space. Here’s how to make your content fill the available space.| @samwize
In the new string catalog, you can easily right click > Vary by Plural > Edit it as you like.| @samwize
These are helpful snippets when using TCA. Binding a TextField TextField("Search",text:$store.query)// Binds to State.queryenumAction:BindableAction{// Must be a BindableActioncasebinding(BindingAction<State>)}varbody:someReducerOf<Self>{BindingReducer()// Add the reducerReduce{state,actionincase.binding(\.query):...}} The use of BindableAction and BindingReducer helps in reducing many boilerplate. Presentation Sheet structState{@Presentsvardestination:Destination.State?}@ReducerenumDestinati...| @samwize
When creating a custom view, it is common to init with a String, either with localization or not. This post will explore a few ways to init the custom view (largely depends on your requirement). Take a simple TagView as an example. structTagView:View{lettext:LocalizedStringKeyvarbody:someView{Text(text).padding().background(RoundedRectangle(cornerRadius:4).strokeBorder(.green,lineWidth:1))}} In the above, the view simply provide the LocalizedStringKey property. This supports localization as o...| @samwize
For a simple view, we can use onTapGesture to handle taps easily. At times you want to handle simultaneous gestures.| @samwize
It is very easy to create swipe action for your rows. But there are SwiftUI nuances that might not show the buttons when you swipe. I hope this will save you some hours. Do NOT apply button style Let’s start with a working example: List{Text("Swipe this row from trailing edge").swipeActions{Button("Reply",systemImage:"envelope.open"){}}} If you were to apply any button style (eg. system borderless or custom styles), then the button will NOT show up at all. Button("Reply",systemImage:"envelo...| @samwize