Memory Management – MRC vs ARC

Before diving into Memory Management, we need to know the basic definatioon 1) Value and Reference Types Types in Swift fall into one of two categories: 1) “Value Types” -> where Each instance keeps a unique copy of its data. Usually defined by structs (incl. arrays and dictionaries) enumerations tuple basic data types (boolean, integer, float, etc.) […]

What is Dangling pointer ?

Since Objective-C is based upon C foundation, it is possible to use C-style functions. However Objective-C’s full power is only unlocked if you make full use of its object-oriented extensions. Before  talking about Dangling pointers first we  have to know about pointers. Pointers : A variable within an application can be considered to consist of four […]

What is forward declaration

Forward declaration is just to silence the compiler that this class exists, but it has no idea about its members, methods, properties, size… Suppose a condition   It basically tells the compiler that the class RootViewController exists, without specifying what exactly it looks like (ie: its methods, properties, etc). You can use this to write […]

Life cycle of UIViewController in iphone

What is LifeCycle? LifeCycle is an event which have certain steps from the point of creation to deletion. So how do we know about the steps during this period? A Sequence of methods are called as they progress through the LifeCycle. Now we may need to perform different kind of actions at different steps of […]

What is dynamic in iOS and when to use the dynamic

In simple words we can say that @dynamic keyword tells the compiler that you will provide accessor methods dynamically at runtime. This can be done using the Objective-C runtime functions. Or @dynamic just tells the compiler that the getter and setter methods are implemented not by the class itself but somewhere else like the superclass […]