如何解决在iPad上具有视图旋转按钮
| 我有一个通用应用程序,该应用程序具有以编程方式创建的按钮,可以根据设备插入到特定的框架位置。现在,我需要在iPad上使用受支持的视图旋转相同的按钮,并且在执行该操作时非常固定。到目前为止,这是我所拥有的: 另外,我应该提到以下代码在-(void)configureEnvironmentUsingAppData:(NSString *)appData
,并且所有视图都是在整个程序中以编程方式创建的。
//用于INBOX的BEGIN插入按钮/////////////////////////////////////////// ////////////////
appButton = [[UIButton buttonWithType:UIButtonTypeCustom] retain];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
appButton.frame = CGRectMake(700,25,24,16);
}
else
{
appButton.frame = CGRectMake(290,16);
}
[appButton setBackgroundImage:[UIImage imageNamed:@\"envelope_white.png\"] forState:UIControlStateNormal];
appButton.layer.borderColor=[UIColor clearColor].CGColor;
appButton.backgroundColor = [UIColor clearColor];
[appInboxButton addTarget:self
action:@selector(showAppInbox)
forControlEvents:UIControlEventTouchDown];
[self.window addSubview:appButton];
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。