2010-06-09 41 views
0

我曾嘗試下面的代碼,以確定在當前shouldAutoRotate視圖邊界.. FN如何確定Ipad App分割視圖中的當前視圖邊界?

UIViewController *temp1 = [appDelegate.splitViewController.viewControllers objectAtIndex:1]; 
float screenwidth = temp1.view.bounds.size.width; 
float screenheight = temp1.view.bounds.size.height; 

BT實際上當u從一個模式旋轉到另一個,它提供了一個老的結合值insted的新鮮界限值.. ? 任何人都知道如何實現它?

回答

1

-didRotateFromInterfaceOrientation: method中執行此操作。

-shouldAutorotateToInterfaceOrientation:應該只用於確定目標方向是否可以接受,而不是別的。

+0

感謝肯尼... -didRotateFromInterfaceOrientation:方法使我正確的答案... – Mahesh 2010-06-10 06:19:51

+0

@Mahesh - 如果他回答你的問題,你應該紀念的小複選框,這個答案的左邊,以接受它。 – 2010-08-27 17:31:10