nil
Nov 18
Development, Tips nil, ObjC No Comments
Overview
nil is ObjC’s null, which means that the pointer to the object doesn’t really point to anything. This is usually when you haven’t created the object.
However, in ObjC, nil is much more useful than in other languages. In languages like Java, if an object is null and you try to do pretty much anything with it, it will fail at runtime. nil is a lot more flexible.
In ObjC, you can send nil as a parameter for a selector(that’s how methods are called on ObjC, will use that from now on), receive nil from one, and even call a selector on nil.
RSS
Twitter

