0

I have a class with nib file. On that nib file i put a button.

I want when somebody press that button it take you to another class's view i.e. nib file.

I have tried this

FormController *controller = [[FormController alloc] initWithNibName:@"countriesViewController" bundle:nil];

[self.navigationController pushViewController:controller animated:YES];
rckoenes
  • 69,092
  • 8
  • 134
  • 166
Mann
  • 5,477
  • 6
  • 45
  • 57
  • what is the problem in this method? – ram Aug 02 '11 at 10:13
  • @ram it gives error say application tried to load nil view – Mann Aug 02 '11 at 10:19
  • Do you have a Navigationcontroller which holds the viewControllers? – rckoenes Aug 02 '11 at 10:22
  • Yes. i have Navigationcontroller. Like i have about 4 classes. i want that from each class's view or nib file there will be a button. when that button will be pressed it will take me other class's view or nib file. – Mann Aug 02 '11 at 10:24
  • In my application basically i am making form. when your fill that form there will be button after pressing that it should take you confirmation classes with nib file. – Mann Aug 02 '11 at 10:25
  • @Raj dev what is error in ur code? can u explain? – ram Aug 02 '11 at 10:27
  • It shows following error terminate called after throwing an instance of 'NSException' Current language: auto; currently objective-c – Mann Aug 02 '11 at 10:30
  • http://stackoverflow.com/questions/6414711/nsmutablestring-appendstring-generates-sigabrt-error – ram Aug 02 '11 at 10:34
  • @ram i got this error 2011-08-02 11:38:11.826 booktable[1198:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] loaded the "FormController" nib but didn't get a UITableView.' *** Call stack at first throw: – Mann Aug 02 '11 at 10:39
  • have delegate and data-source of table view? – ram Aug 02 '11 at 10:48
  • http://stackoverflow.com/questions/4850601/how-can-i-solve-nsinternalinconsistencyexception-reason-entityforname-fail – ram Aug 02 '11 at 10:49
  • my table view is not in nib. when i click on any cell of table with it will take me to nib. – Mann Aug 02 '11 at 10:57
  • is the countriesViewController the view of FormController ? – Lokus001 Aug 18 '11 at 22:31

0 Answers0