Class level access

Ads

Objective C have the class level feature.

Class level access

Objective-C provides facility of class level
access. In the examples given above we have used '-' sign before method, '-'
means instance level access. Now we will see how to define method that can be
access on class level.

Here in this example we have created a method named 'classShow'
that can be accessed on class level means no need to create object to use
classShow() method. We can directly use this method through class name. +(void)init method is called when objective-C program starts and it calls for
every class so it is the better place to define class level variable.