ABSTRACT CLASS IN COCOA

Tarun Kumar

Total Post:107

Points:535
Posted by  Tarun Kumar
 492  View(s)
Ratings:
Rate this:
  1. Tarun Kumar

    Post:107

    Points:535
    Abstract class in cocoa

    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
    @end
    @implementation AbstractClass
    + (id)alloc{
    if (self == [AbstractClass class]) {
    NSLog(@”Abstract Class cant be used”);
    }
    return [super alloc];
    @end

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!