Expression Pattern Operator in Swift
Hello people, Leo here. I’m cheerful to say that today we’ll study the Expression Pattern Operator in Swift. We’ll explore one kind of hidden operator called pattern matching operator or expression pattern operator. This is behind the scene and used as a *switch* statement operator by Swift. So let’s see how can we use it […]
OperationQueue in Swift
Hello ladies and gentlemen, Leo here. Today we’ll explore OperationQueue in Swift in Swift. We will learn how it can help you improve your async operations. The scope is introductory therefore we won’t going to explore every possibility with OperationQueues, the focus is the basics of the API. The main goal to achieve is how to […]
What are Lazy Variables and Why Use in Swift
Hello ladies and gentlemen, Leo here. Today the topic is lazy variables and why it’s important for you to know. The lazy var is a special type of *var* that means the variable value isn’t calculated until we first use it. This brings to the table the flexibility of having 1000 items in memory that […]
Safe Get a Value From an Array in Swift
Hello people, Leo here. The topic today is how to Safe get a value from an array in Swift. Why this is important? Well, if you don’t have a mechanism to safe get values from your arrays, one day your app can crash in production because you didn’t cover all the edge cases for your […]
How to use Fallthrough Keyword in Swift
Hello everyone, Leo here! Today we will learn how to use the Fallthrough keyword in Swift. We’ll explore a not-so-used keyword in swift called Fallthrough. The use case is quite limited but it’s important to know to make your Swift Language Toolbox bigger! No more talking, let’s code. Let’s code! Problem – Fallthrough Keyword in […]
How to use StaticString in Swift
Hello brothers and sisters, Leo here. Today we’ll look to a struct in Swift called StaticString. It is always good to know what the native APIs can provide to us in terms of capabilities, optimizations, and intentions. StaticString is one of the things that make perfectly clear what are your intentions with your types. This way […]
The basics of Regex in Swift
Hello, my fellow friends, Leo here. Today we’ll see how it can be easy to use regular expressions (RegEx) for pattern matching in Swift. Regex is a very useful tool with you need more advanced pattern matching and it’s crucial to know the basics of the rules. I’ll break the magic here for you all, […]
async Threading why: understand DispatchGroup is
Hello everyone, Leo here. Today we’ll see a very common problem in computer science, and yes is about asynchronous programming. There’s a lot to explore inside Apple’s GCD framework but today we’ll dive into a class called DispatchGroup and analyse what it can do for us. We will check various examples of DispatchGroup in practice and how […]
The difference between ‘class func’ and ‘static func’ in Swift
Hello, my people, Leo here. Today I learned that you have two ways to declare functions on the class/struct level and it’s using the keywords above and the post today is about the difference between class func and static func. Knowing the difference between those two is very important for any iOS because it has consequences in […]
Introduction to Swift Phantom Types
Hello everyone, Leo here. Today I want to share something I recently discovered, and you guessed right, the Swift Phantom Types in. The phantom type definition is a technique to create a compile-time guarantee that a given piece of data will always match our requirements. In others, a way to Swift is MORE type-safe at compile […]