How to instantiate a class in Objective-C that don't inherit from NSObject
Given this: Person.h: @interface Person { } - (void) sayHello; @end Person.m: #import "Person.h" @implementation Person - (void)sayHello { printf("%s", "Steve"); } @end How do you instantiate the Person? I tried this: Person *p = [Person new]; That doesn't work, nor this: Person *p = [Person alloc]; [UPDATE] I forgot to tell, I already tried inheriting from NSObject, the new and alloc works. I'm just curious if we can instantiate a class that doesn't inherit from NSObject? You absolutely can do so. Your class simply needs to implement +alloc itself, the way that NSObject does. At base, this