ios - UIAlert 不显示

标签 ios uialertview

这里是新鲜绿色的新手。我刚开始编程并且已经被 UIAlert 困住了。我在这个网站上搜索过,但是有太多的帖子,正如我所说的,我对这一切有点陌生,所以我不知道真正要寻找什么。这就是我的。

-(void)showError {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error"
                                                message:@"Please try again later. Have a nice day."
                                               delegate:nil
                                      cancelButtonTitle:@"Dismiss"
                                      otherButtonTitles:nil];
}

最佳答案

需要做的

[alert show];

呈现

关于ios - UIAlert 不显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22160774/

相关文章:

ios - ld : 600 duplicate symbols for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

ios - 无效更新 : invalid number of items on UICollectionView

ios - 将 Subview 传递给子类 UIView

html - 在iOS的hpple库中对Xpath查询使用通配符

ios - 使用自动布局管理 subview 中 UILabel 的高度

objective-c - IOS:两个具有两种不同委托(delegate)方法的 UIAlert

swift3 - UIAlertView 中的时间选择器

IOS UIAlertView 未显示

ios - 链接 UIAlertAction 打开另一个 ViewController

iphone - iPhone上的警报 View