Objective-C Language NSObject


Example

@interface NSString : NSObject (NSObject is a base class of NSString class).

You can use below methods for allocation of string class:

- (instancetype)init

+ (instancetype)new

+ (instancetype)alloc

For Copy any object :

- (id)copy;

- (id)mutableCopy;

For compare objects :

- (BOOL)isEqual:(id)object

To get superclass of current class :

superclass

To check which kind of class is this ?

- (BOOL)isKindOfClass:(Class)aClass

Some property of NON-ARC classes:

- (instancetype)retain OBJC_ARC_UNAVAILABLE;

- (oneway void)release OBJC_ARC_UNAVAILABLE;

- (instancetype)autorelease OBJC_ARC_UNAVAILABLE;

- (NSUInteger)retainCount