Sen LiuWhy do you need @autoclosureWhen define a function in Swift,@autoclosure wraps an expression or a literal argument into a closure. It is just syntactic sugar. You can…Nov 27, 2018Nov 27, 2018
Sen LiuSwift: Use Self to let methods in subclass return instances of subclassMany of us know Self can be used in protocols, but Self can also be used in classes.Aug 8, 20181Aug 8, 20181
Sen LiuSwift: Use KeyPath to modify a variable passed by reference in Escaping ClosureIn Swift we use inout to perform pass-by-reference, however, escaping closure does not support inout. This means we cannot use inout in…Jul 31, 20181Jul 31, 20181