Let’s learn about Key-value observing with Swift 5 and Xcode 10. Key value observer is used to observe for changes on a given variable. Check out this video tutorial.
Swift : Beginners Guide to Type Casting
Type casting in Swift can be little confusing at times. Especially with those syntaxes such as as as? as!. Let’s learn how to type caste between different type of objects in this video lesson. If you like this video lesson please make sure to subscribe to my channel as I’m planning more video tutorials in […]
Swift : Factory Pattern
Factory pattern can come in handy when you want to reduce the dependency of a class on other classes. On the other hand, it encapsulates the object creation process and users can simply pass in parameters to a generic factory class without knowing how the objects are actually being created. Also, it gives you a […]
Swift : Unwrapping Like a Boss
In order to understand this article, you should have a clear idea of Optionals. If you don’t know what is Optionals in Swift then please read my article on the same topic and come back here. Simple Unwrapping let name : String? = "Jay" if let myName = name {<br /> print(myName) } As […]
Swift Optionals for Beginners
If you are a beginner Optionals can be a bit tricky to understand even though you may have found your way around it. In this article, we gonna look at the underlying principles behind SwiftOptionals. Before beginning, I assume that you know the basics of Swift. If not please follow my YouTube Videos and come […]
Introduction to Swift 4
I recently have done two video tutorials for Swift beginners. If you are brand new to Swift then going through this videos will get you started with Swift. Part 1 Part 2 If you enjoy the videos, do subscribe to my YouTube channel.
Protocol Extensions — iOS
Before start reading this article, I’d highly recommend that you please go ahead and read my following articles. Understand Protocols — iOS Passing data between ViewControllers via Delegate & Protocols As usual lets setup our base protocols and classes as below. I hope the code below is self explanatory if you have read my previous article on […]
Understand Protocols – iOS
I’m not sure why many developers (even some senior developers) confuse Protocols with Object and Struct. You can think of Protocols as a superclass with some rules. When you conform to that class you’ll have to simply obey those rules. In this case these rules can be methods and properties. Let’s look at an example […]
UICollectionView and Dynamically changing Layouts on Runtime
So you’ve been trying to set custom layouts on run time on a UICollectionView or you were trying to change the UICollectionView’s cell count per row. But you’ve realised that it eventually crashes instead of getting what you want done. It’s mainly because you need to invalidate your UICollectionView’s layout. It can be simply done […]