Spa*_*Dog 1 iphone iphone-sdk-3.0 ipad
嗨,我有这段代码......
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
Run Code Online (Sandbox Code Playgroud)
和
- (void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if(UIInterfaceOrientationIsPortrait(interfaceOrientation)){
// WTF, this runs when I change to Landscape
} else {
// this runs when I change to Portrait??? shouldn't it be the contrary?
}
}
Run Code Online (Sandbox Code Playgroud)
如你所见,代码反向运行,我的意思是,当我将设备更改为纵向时应该运行的部分,代码的横向部分运行,反之亦然.
当我转动设备时,self.view会旋转.
这个UIInterfaceOrientationIsPortrait是在旋转之前测试界面的方式还是我错过了什么?
谢谢你的帮助.
归档时间: |
|
查看次数: |
844 次 |
最近记录: |