Swift: Pattern Matching

Disclaimers I’m on the path of learning these complex topics, so if you find a mistake, please let me know at @lintuxt The ideas, concepts, stories, and examples of this post are ALL a product of my invention. Any similarities with reality are just a pure coincidence. The post assumes some basic knowledge about if/else and switch statements in Swift. Pattern Matching in Swift Pattern Matching is one of the flagships of the Functional Programming paradigm, and Swift has you covered....

May 28, 2024 · 5 min

Swift: Set of Strings and Integers

Strings + Integers This demo shows one way of implementing a mix of types in a Set. Code Sample enum StringOrInt: Hashable, CustomStringConvertible { case string(String) case int(Int) var description: String { switch self { case .int(let int): return String(int) case .string(let string): return string } } } var mixedSet: Set<StringOrInt> = Set([.string("@lintuxt"), .int(0), .string("@lintuxt"), .int(1)]) print(mixedSet) /* Output: [0, 1, @lintuxt] */

May 28, 2024 · 1 min

iOS: Remove Storyboards

How to Remove the Dependency of Main.storyboard File in an iOS Project 1) Delete Main.storyboard File In the project navigator, delete the Main.storyboard file (when prompted, click “Move to Trash”). 2) Delete “Storyboard Name” Reference in Info.plist File In the project navigator, select the Info.plist file. Press Cmd+F and type “Storyboard Name” to find and delete the highlighted line. (To delete, use Cmd+Backspace) 3) Delete “UIKit Main Storyboard …” Reference from Build Settings In the project navigator, select the very first row (project name) and on the right side, select the “Build Settings” tab....

May 28, 2024 · 1 min

SwiftUI: Split The Check App

This is a very short sample of an app that allows calculating how much every person should pay based on the check, the tip, and the number of people. Credits: This app is based on the course “100 Days of SwiftUI” by @twostraws. Code Sample import SwiftUI struct ContentView: View { @State private var checkAmount = 0.0 @State private var peopleQuantityIndex = 0 @State private var tipPercentage = 18 @FocusState private var shouldShowKeyboard: Bool static let currencyCode = Locale....

May 28, 2024 · 1 min

SwiftUI: Cheatsheet

SwiftUI Cheatsheet A friendly way to remember some SwiftUI snippets. SwiftUI Children Limits SwiftUI by default limits its children to 10. However, this doesn’t mean that we can’t have more than ten elements in the same view. We just need to add the Group {...} directive. In the following example, it can be noticed that we have seven children under the Form {...} directive and one of them is a Group {....

May 27, 2024 · 2 min

About Me

Contact Information Name: Alexis Charytonow eMail: [email protected] LinkedIn: linkedin.com/in/alexis-charytonow GitHub: github.com/lintuxt Summary Born in Resistencia, Chaco, Argentina. Currently residing in Austin, TX, USA. iOS Engineer with 3+ years of XP. 5+ years of XP in Quality Assurance (SDET). Superpowers I am deeply passionate about technology. I learn quickly. I value a holistic approach to problem-solving. I believe in hard work. I see failure as a natural part of innovation. I don’t believe in meetings that can be replaced by emails....

May 26, 2024 · 2 min

How to Integrate Xcode Frameworks and CircleCI

Using Xcode Frameworks with macOS targets for fast test running and CI integration. Introduction When building software is a good idea to write tests. For the sake of simplicity (you’ll see why later), I’m going to put unit, integration and system tests into the same tests folder. We will leave end-to-end tests (e2e tests from now on) in a separate folder. Warning: This post was intended for Xcode 13.4.1 The idea of this post is to show how to:...

August 2, 2022 · 3 min