【发布时间】:2014-08-30 14:17:08
【问题描述】:
我创建了一个空的 *.xib,添加了类并引用了它们。
我需要显示对当前显示的所有 UIView 的控制。我这样做是为了显示控件:
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
ExternalDisplayRemoteControl *remoteControl = [[ExternalDisplayRemoteControl alloc]initWithNibName:@"ExternalDisplayRemoteControl" bundle:nil];
remoteControl.view.frame = CGRectMake(20, 20, appDelegate.window.bounds.size.width-40, appDelegate.window.bounds.size.height-40);
remoteControl.view.alpha = 0.0;
[appDelegate.window addSubview:remoteControl.view];
//Display the customView with animation
[UIView animateWithDuration:0.4 animations:^{
[remoteControl.view setAlpha:1.0];
} completion:^(BOOL finished) {}];
在 Interface Builder 中,我尝试将方向设置为横向 - 没有帮助
结果是:
我添加的 UIView 顺时针旋转了 90 度...为什么?
截图:
【问题讨论】:
标签: ios objective-c ipad uiview