Changes

Writing Objective-C Class Methods

31 bytes added, 14:41, 27 May 2010
Creating a New Class Method
== Creating a New Class Method ==
<google>ADSDAQBOX_FLOW</google>
In order to demonstrate the concept of class methods we are going to work on a simplified version of our BankAccount class and add write a class method that will count the number of instances of the BankAccount class that have been initiated. To do this we are going to write a new ''alloc'' method for class called ''newAlloc''. The ingredients we need to achieve this are as follows: