I have a relatively huge application with about 40 views and about 300 classes. The application uses SQLite database. I develop this app about half a year and till now everything is ok. The process of creating views and controllers at runtime are made by a ViewController Factory. At every start I create a dictionary with info about all viewcontrollers (storing class and xib name as string). Then when I want to display a view, I use the NSClassFromString method to get the controller's class, and I create the controller with the following method:
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
The strangest thing is in case of certain viewcontrollers (about 5 of about 40) this method gives back nil (such a viewcontroller too, where I don't fetch data from database, so I don't think this would be the problem). Till now everything is ok, every view controllers created. I noticed that, I can resolve this issue by deleting every IBOutlet reference, and drawing the view from code. Then the method works again. I don't understand that... I tried to create a new view and add all IBOutlet reference again, but it doesn't work. Anyone faced this problem earlier? Thanks, madik