ios6旋转问题 [英] ios6 rotation problems
本文介绍了ios6旋转问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在将我的应用转换为ios6,但我遇到轮换问题。
我们可以在旋转设备时帮助我调用哪些方法
I am converting my app to ios6 but i am getting rotation problems. Can some one help me which methods will be called when we rotate device
推荐答案
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation) toInterfaceOrientation duration:(NSTimeInterval)duration
{
[self doLayoutForOrientation:toInterfaceOrientation];
}
- (void)doLayoutForOrientation:(UIInterfaceOrientation)orientation {
if (UIInterfaceOrientationIsPortrait(orientation))
{
//set the frames here
}
else
{
//set the frames here
}
}
这些是ios 6中的新方法,您可以根据方向设置帧。希望它对你有用。
These are the new methods in ios 6 where you can set the frames as per the orientation. Hope it will useful to you.
这篇关于ios6旋转问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文