Hello everyone! Let’s take a look what I learned in 20 January 2021, shall we?
#1 - Weak self and unowned self explained in Swift
“Reference counting applies only to instances of classes. Structures and enumerations are value types, not reference types, and are not stored and passed by reference.”
weakreferences are always declared as optional variables as they can automatically be set to
nilby ARC when its reference is deallocated.”
“For many of us, it’s best practice to always use weak combined with self inside closures to avoid retain cycles. However, this is only needed if self also retains the closure. By adding weak by default you probably end up working with optionals in a lot of cases while it’s actually not needed.”
“Property observers aren’t called when ARC sets a weak reference to
#2 - print() tricks
# Default seperator between words is space " " print("kebap", "case", separator: "-") // kebap-case print("kebap", "case", separator: "-", terminator: "->") // kebap-case->
Today about SSL Pinning, I found two great sources, will take more time to go through them:
I hope you liked what you heard and I am really looking forward to seeing you in the next one!
Keep up to date and follow @kahyalar.xyz on Instagram. DMs are always welcome! 🔥
You can reach out to me via Contact Form, Email and social media icons in the left. 💌
Until next one,