我已经在Xcode 5.In纵向视图黄色按钮创建自定义按钮将具有显示和在横向模式下的蓝色按钮将不得不display.my代码如下:自定义按钮5
-(BOOL)shouldAutorotate {
UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
if (orientation == UIInterfaceOrientationPortrait) {
[self addYellowBtn1];
}
else if(orientation == UIInterfaceOrientationLandscapeRight)
{
[self addLightBlueBtn2];
}
return YES;
}
当我运行这个程序,在第一纵向视图显示黄色button.but当我变成景观的两个按钮分别displayed.can谁能帮助我?
您需要删除或隐藏其存在于potraite模式的按钮。 – Balu 2014-11-03 05:43:31
您的编码是好的,U需要修改的东西 – 2014-11-03 05:47:45
如何隐藏黄色按钮,在景观 – 2014-11-03 05:49:33