我有一个UIAlertView在iOS 7中完美显示,但在iOS 8中,它不显示任何按钮或标签。警报仍然可见,但只是一个小白盒子。 “确定”和“取消”按钮也将其事件作为参考,但没有文字可见。iOS 8:UIAlertView/UIAlertController不显示文本或按钮
我已经使用这个警报就按一下按钮显示
- (IBAction)sel_btnLogout:(id)sender {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Logout!" message:@"Are you sure you want to logout?" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok", nil];
[alert show];
}
我查了框架中的iOS 8:这是给(0,0,0,0),但在iOS的7这是给一个确定的价值。
我也检查迭代到uialertview的子视图。在iOS7中,它会进入循环,因为它会发现警报的子视图。在iOS8中,它表示没有alertView的子视图。
这是真正的密码?如果不是,请发布实际代码。 – rmaddy 2014-10-07 04:52:40
@siddhant发布真实的代码。此代码也在iOS 8中工作。因此,请在此复制您在项目中编写的确切代码。 – Jasmeet 2014-10-07 04:53:36
试试这个http://stackoverflow.com/questions/25927676/uialertview-title-not-display/25928050#25928050 – 2014-10-07 04:59:29