Google News
logo
IOS - Interview Questions
What is an abstract class in Cocoa?
Cocoa doesn't provide anything called abstract. It can create a class abstract that gets checked only at the runtime while it is not checked at the compile time.
@interface AbstractClass : NSObject
@end
@implementation AbstractClass
+ (id)alloc{
if (self == [AbstractClass class]) {
NSLog(@"Abstract Class can’t be used");
}
return [super alloc];
@end
Advertisement