我有一个带有 4 个按钮和一个标题的警报 View 。它在 iOS 7 上运行良好,但在 iOS 6 上标题与第一个按钮重叠。 我该如何解决? 提前谢谢你。
更新:这是代码:
UIAlertView * dialog = [[UIAlertView alloc] init];
[dialog setDelegate:self];
dialog.alertViewStyle=UIAlertViewStyleDefault;
[dialog setTitle:@"These are your choices"];
[dialog setMessage:@""];
[dialog addButtonWithTitle:@"Button 1"];
[dialog addButtonWithTitle:@"Button 2"];
[dialog addButtonWithTitle:@"Button 3"];
[dialog addButtonWithTitle:@"Cancel"];
[dialog show];
截图如下:
最佳答案
我猜这是在 iOS 6 中初始化后添加按钮时出现的错误。在 initWithTitle:message:delegate:cancelButtonTitle:otherButtonTitles:
初始化程序中添加按钮,您应该没问题。
关于ios - 带有按钮的 UIAlertView,标题重叠?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22200491/