Search code examples
iphoneiosipadclass-method

use of class methods in iOS


I know the difference between class methods and object methods but I am not clear for why we use class methods in iOS? can anyone give me example so I can understand that..??


Solution

  • Class methods are used for library routines. To access these methods one do not have to create its object.

    For example, Some times it gives you easy initializers to create an object.

    NSArray *arr = [NSArray array];