tipWithMessage(@"没有数据啦!");
//提示弹窗
NS_INLINE void tipWithMessage(NSString *message){
dispatch_async(dispatch_get_main_queue(), ^{
UIAlertView *alerView = [[UIAlertView alloc] initWithTitle:@"提示" message:message delegate:nil cancelButtonTitle:nil otherButtonTitles:nil, nil];
[alerView show];
[alerView performSelector:@selector(dismissWithClickedButtonIndex:animated:) withObject:@[@0, @1] afterDelay:0.9];
});
}
本文介绍了一个简单的iOS应用中使用的提示框实现方法。通过Objective-C语言,利用UIAlertView展示一个带有自定义消息的提示对话框,并设置了延迟关闭的功能。

5365

被折叠的 条评论
为什么被折叠?



