Answer the question
In order to leave comments, you need to log in
[[+content_image]]
How to pass a class to a method and create an instance of the class?
Good day, in the good old Objective-C, you could create a method, and pass the class:
- (void)setClass:(Class)aClass {
NSObject *object = [[aClass alloc] init];
}
[self setClass:[User class]];
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question