Memory Management – MRC vs ARC

How Manual Memory Management works in Objective C? We will cover explanation of: retain, release, autorelease, alloc, dealloc, copy, and NSAutoreleasePool. You can mostly avoid Manual Reference Counting(MRC) by turning on Automatic Reference Counting (ARC) or garbage collection.Its up to you, but Apple pushes developers to use ARC. We will be covering: Coming From C/C++ […]

Difference between Strong and weak in IOS

Strong Anytime a pointer variable stores the address of an object, that object is a owner and will stay alive. This is known as a Strong reference. So it means that you want to “own” the object. Only when you set the property to nil will the object be  destroyed. Why we use Strong Creates ownership between property […]

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 […]