As per the standard definition, Closures are self-contained blocks of functionality that can be passed around and used in your code. When passing a closure expression to a function as the function’s final argument, it can be useful to write a trailing closure. Trailing closure is written after the
IntroductionIn iOS development, the view controllers are the foundation of the Application's internal structure. The View Controller is the parent of all the views present on a storyboard. Each UIKit application has at least one ViewController. It facilitates the transition between various parts of the user interface. Functions are called
An Optional is a type of its own that can handle the absence of a value. Optionals can contain nil values and there are multiple ways to unwrap them. In this article, we will understand why not to unwrap them forcefully and how to unwrap them safely. Optionals A type
IntroductionAn array is an ordered, random-access generic collection. The Array type to hold elements of a single type, the array’s Element type. An array can store any kind of elements—from integers to strings to classes. Are Arrays Thread-Safe?Intrinsically, Arrays in Swift are not thread-safe. Arrays are 'value-typed'
Array and NSArray are very similar and core constructs in iOS Development, and cause of this similarities we sometime forget how different this two construct works, these are some major difference that you must know about Array and NSArray. ArrayArray is a struct which means it is value type in