我已经创建了一个加载器视图,并使用以下代码设置了指标的位置:
loadingView = [[UIView alloc]initWithFrame:CGRectMake(455, 225, 80, 80)]
如何为人像模式设置其他位置?谢谢
if([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortrait)
{
//portrait
loadingView = [[UIView alloc]initWithFrame:CGRectMake(225, 455, 80, 80)];//any position you want
}
else
{
//landscape
loadingView = [[UIView alloc]initWithFrame:CGRectMake(455, 225, 80, 80)];//any position you want
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句