Hi - relatively new programmer here. Look at the two classes defined below. I'd like to be able to call the following:
[instanceOfSecondClass transitionToPage: [instanceOfFirstClass nextPage]];
However, that doesn't seem to work (because I'm trying to return a class, not an instance of a class.)
@implementation FirstClass
- (id)nextPage {
return SomeOtherClass;
}
@end
@implementation SecondClass
- (void)transitionToPage:(id)someOtherClass {
currentPageViewController = [[mySomeOtherClass alloc] init];
...
}
@end
Is there any way to accomplish what I am trying to do here?
Sometimes things that make sense to me totally don't make sense in the real world :).
Thanks for the help!