2011-04-23 73 views

回答

0

編號[UIDevice setOrientation:]這樣做,但它是一個私人API。

1

把下面的代碼在你的控制器類有UIViewControllers之間的不同取向,

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 
    // Return YES for supported orientations 
    return (interfaceOrientation == UIInterfaceOrientationLandscapeRight); 
} 

你也可以低於其觀點之間不同的方向嘗試。

[[UIDevice currentDevice] performSelector:@selector(setOrientation:) withObject:(id)UIInterfaceOrientationLandscapeRight]; 
相關問題