Home > DeveloperSection > Interviews > Abstract class in cocoa

Posted on    November-24-2015 7:40 AM

 iPhone iPhone  Ios  Objective C 
 1 Answer(s)
  451  View(s)
Rate this:

Tarun Kumar

Total Post:107

Posted on    November-24-2015 8:40 AM

Cocoa doesn't provide anything called abstract. We can create a class abstract which gets check only at runtime, compile time this is not checked.

@interface AbstractClass : NSObject
@implementation AbstractClass
+ (id)alloc{
if (self == [AbstractClass class]) {
NSLog(@”Abstract Class cant be used”);
return [super alloc];

Don't want to miss updates? Please click the below button!

Follow MindStick