2011-03-01 80 views
0

我新開發的iphone。在這裏我想查看屏幕像iphone中的風景porgrammaticaly。我現在完成像肖像側,當我轉動左右側automaticaly我添加了一些圖像和pickerview數據這些也顯示爲像肖像和風景屏幕到iphone。屏幕方向像iphone中的肖像和風景

任何一個PLZ能幫助我在iphone

programmaticaly屏幕如何定位預先感謝您。

回答

1

在您的班級中使用此方法。

  • (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { //返回YES用於支撐取向

    回報(interfaceOrientation == UIInterfaceOrientationLandscapeRight ||
    interfaceOrientation == UIInterfaceOrientationLandscapeLeft);

}