I have this code but it returns “nil” instead of a new class.
Here it is useless but in my programme it makes sens.
Class myClass = [SettingsTableViewController class];
UIViewController *targetViewController = [[myClass alloc] initWithNibName:nil bundle:nil];
[[self navigationController] pushViewController:targetViewController animated:YES];
You are forgetting something or you might don’t know. Here is the proper code.