我發現旋轉使我的應用程序崩潰。旋轉iPhone/iPad的
當你拿在手中的設備,你動它一下,應用註冊了所有這些微小的動作,相應地改變方向,它看起來應用程序的忙。一切都變慢了。
此外,當我滾動的東西,同時改變方向,滾動停止。
怎麼可以這樣的事情進行管理?
編輯:
public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation) {
if (UIDevice.CurrentDevice.Orientation == UIDeviceOrientation.FaceUp ||
UIDevice.CurrentDevice.Orientation == UIDeviceOrientation.FaceDown)
{
return false;
} else {
return true;
}
}
您的ViewController郵編,尤其是「shouldautorotatetointerfaceorientation」的方法。 –
公共覆蓋布爾ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation toInterfaceOrientation) \t \t { \t \t \t如果(UIDevice.CurrentDevice.Orientation == UIDeviceOrientation.FaceUp || UIDevice.CurrentDevice.Orientation == UIDeviceOrientation.FaceDown) \t \t \t { \t \t \t \t return false; \t \t \t} \t \t \t其他 \t \t \t { \t \t \t \t迴歸真實; \t \t \t} \t \t} –
未來只需編輯自己的格式化代碼。這是MonoTouch嗎? –