I would like to pick a random UIViewController from a stored list of view controllers to load after one has finished. Yes, it needs to be a UIViewController and not just a UIView. I'm thinking I could do this with a .plist, but how would I go from the string name of a view controller to the actual view controller object name?
To create an instance of a class from a name, you can use:
UIViewController* object = (UIViewController*)[[NSClassFromString(@"NameofClass") alloc] init];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With