2
Reply

What happens when you invoke a method on a nil pointer in iOS?

Kunal  Gautam

Kunal Gautam

Dec 20, 2013
3.5k
0

    A message sent to a nil object is perfectly acceptable in Objective-C, it's treated as a no-op. There is no way to flag it as an error because it's not an error, in fact it can be a very useful feature of the language.

    Sourabh Sharma
    June 27, 2016
    0

    It returns 0, nil, a structure filled with 0s, etc.

    Munesh Sharma
    May 02, 2014
    0