Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // self.array is an array with controllers of difrent classes.
- // self array is initialized from a plist of NSStrings which contain the name of classes.
- // if the class name is from 2 words i want to know how can i init the correct nib name?
- // in the classes and resouces if i chouce a name from 2 words it became: word1_word2.
- // how can i fix this?
- - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
- {
- NSString *name = [self.array objectAtIndex: [indexPath row]];
- id controller = [[NSClassFromString(name) alloc] initWithNibName: name bundle: nil];
- [controller setTitle: name];
- [self.navigationController pushViewController: controller animated:YES];
- [controller release];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement