У меня есть следующий код в UIViewController
Notepad *notepad = [[Notepad alloc] initForNewTopLevelTask:0 andDAO:self.dao];
[self.navigationController pushViewController:notepad animated:YES];
[notepad release];
Метод initForNewTopLevelTask: andDAO: is:
- (id) initForNewTopLevelTask:(int) theTableSize andDAO:(DAO*) aDAO {
self.dao = aDAO;
tableSize = [[NSNumber alloc] initWithInt:theTableSize];
self.isNew = [NSNumber numberWithBool:YES];
self.isSubtask =[NSNumber numberWithBool:NO];
return self;
}
Когда я поворачиваю вид, ничего не происходит, он не вращается. Если я изменю строку UIViewController на:
Notepad *notepad = [[Notepad alloc] init];
Вращается нормально!
Представление не является частью контроллера вкладок, и я реализовал:
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return YES;
}