RSSAmplifier

Blog

otbivnoe’s blog

iOS evangelist | lover of music, bikes and photography | ex-Yandex

otbivnoe.ruRSS feed ↗10 posts

Latest posts

Alerts in iOS: Simple but Tricky

Alerts are a standard UI element in iOS apps, used to inform users or request decisions. Though they seem simple, alerts involve many subtle guidelines around button order, roles, and colors. Mistakes here can confuse users. In this article, we’ll break down the correct use of alerts, highlight common pitfalls, and focus on Apple’s Human Interface Guidelines (HIG) to help you design clear and safe…

Making Customizable SwiftUI Components

In this article, we’re going to explore different ways of creating customizable components in SwifUI.

Automating RawRepresentable Conformance with Swift Macros

When creating a travel-planner app, it’s essential for users to provide information about their trips. One of the required fields is the visa type. To handle various visa types, we can utilize an enumeration called Visa:

UITouch Me If You Can

During several interview processes, I’ve been asked many times about UIResponder and what the beast it is. I guess everybody can somehow explain this concept in iOS, which I did, but lack of in-depth knowledge frustrated me. So I decided to spend a few evenings to clarify it for myself. In this article I won’t cover the everything about UIResponder at once. Instead we’ll figure out how our app…

Enumerated ForEach in SwiftUI

Today I’m faced with a fairly common task - implementing an enumerated ForEach with indexes in SwiftUI. At first it seemed straightforward, and it was, but with some small pitfalls that I want to highlight in this post. So, without further ado, let’s dive into.

Multiline TextField in SwiftUI

Here it is! How many times did I try to find an answer on Stackoverflow, uhm? No more custom multiline text fields using TextEditor. Starting with iOS 16 we can achieve it using TextField just by adding a new parameter axis:

Type Eraser for Rx Subjects

Let’s continue the series of quick articles!

How to clear Xcode console a bit another way

I think everyone has had a whole debugging day trying to figure out how this bug was caught by a QA team. Embellishes the fact you spend a lot of time repeating these steps to reproduce the bug even once but the QA team does it regularly. Familiar feeling, isn’t it? We have such days from time to time and I had a similar one recently. I turned out as a detective and started to investigate the…

Dependency Injection for Property Wrappers

My past sprint was nothing special. I had to implement an onboarding flow with saving a completion flag so that a user can see this for the first time only. Sounds like a typical work for iOS developers for saving something in UserDefaults, doesn’t it? So, I prepared a special class with the most popular (IMHO) property wrapper inside:

Make friends UITableView with layout margins

It will not surpise you that most iOS applications tend to have scrolling-style screens. Have a look at some of the screenshots I’ve prepared below - all of which contain scrollable content. One more similarity is layout margins, notice that all content is aligned to the left with the same inset - 16pt. It’s important to keep this value consistent across the whole screen. I’ve tried and heard…