0
我曾經在一個UIViewController的UIView不轉
Notepad *notepad = [[Notepad alloc] initForNewTopLevelTask:0 andDAO:self.dao];
[self.navigationController pushViewController:notepad animated:YES];
[notepad release];
的initForNewTopLevelTask下面的代碼:andDAO:方法是:
- (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;
}
謝謝你這麼這麼這麼多! – 2009-11-28 18:54:31