我有一个UIAlertView,它在iOS 7中完美呈现,但在iOS 8中,它没有显示任何按钮或标签.警报仍然可见,但只是一个小白框."确定"和"取消"按钮也会显示其事件,但不会显示任何文本.
我已经使用此警报显示单击按钮
- (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];
}
Run Code Online (Sandbox Code Playgroud)
我在iOS 8中检查了框架:它给出了(0,0,0,0)但是在iOS 7中它给出了一个确定的值.
我还检查了迭代到uialertview的子视图.在iOS7中,它进入循环,因为它找到了alert的子视图.在iOS8中,它表示没有alertView的子视图.