Home > Articles > Programming > Mac and iOS Programming

  • Print
  • + Share This
This chapter is from the book


  • Q. Why does init return an id?

    A. By returning an id, which is often a reference to the object on which it was called, it allows init to substitute a new object for the original one.

  • Q. What is the difference between a class method and an instance method?

    A. You must have an instance of a class to use an instance method; you can simply call a class method with the class name (that is, you do not need an instance). Class methods are often used as factory methods to create new instances of the class.

  • + Share This
  • 🔖 Save To Your Account