SwiftGen 3
This is a quick announce about the new release of my OpenSource code generation tool SwiftGen 3.0.0.
Closures Capture Semantics: Catch them all!
Even with ARC nowadays, itβs still important to understand memory management and objects life-cycles. A special case is when using closures, which are more and more present in Swift and have different capture semantics than ObjCβs block capture rules. Letβs see how they work.
A quick list of overlooked announcements at WWDC'16
Ok, so sadly I wasnβt at WWDC this year π’ and followed it only on video π₯ and Twitter. I bet you all saw the big announcements made during the keynote and the Platform State of the Union talks π. But did you know about all those other new APIs that were added more silently? π΅
Pattern Matching, Part 4: if case, guard case, for case
Now that weβve revisited the various syntaxes for pattern matching in part 1, part 2 and part 3, letβs finish this blog post series with some advanced syntax using if case let
, for case where
and all!
Pattern Matching, Part 3: Custom pattern matching & syntactic sugar
In parts 1 and 2 of this article series, we saw some usages of switch
on a lot of things, including tuples
, Range
, String
, Character
and even type. But what if we can use pattern matching even with our own custom types?
Pattern Matching, Part 2: tuples, ranges & types
In the previous article, we saw the basics of pattern matching using switch
on enums
. But what about using switch
with anything other than enum
types?
Pattern Matching, Part 1: switch, enums & where clauses
From a simple switch
to complex expressions, pattern matching in Swift can be quite powerful. Today weβre going to start exploring it by seeing some cool usages of switch
, before going further in later articles with even more advanced pattern matching techniques.
Being Lazy
Today weβll see how we can be more efficient β‘οΈ byβ¦ being laπ€y π΄.
In particular, weβll talk about lazy var
and LazySequence
. And cats πΈ.
Asynchronous error handling
In a previous article, I talked about error handling in Swift using throw
. But what happens when you deal with asynchronous workflows, where throw
canβt really fit?
Using Generics to improve TableView cells
Happy New Year everybody ππππ! My first post of 2016 will be a useful trick I want to share, which will demonstrate the power of Swiftβs generics and how they can be really handy when dealing with UITableViewCells
and UICollectionViewCells
.