//显示加载中对话框
- (void)dialogShow {
baseAlert = [[UIAlertView alloc] initWithTitle:@"Please Wait" message:@"\n\n\n" delegate:self cancelButtonTitle:@"close" otherButtonTitles: nil];
[baseAlert show];
//Create and add the activity indicator
UIActivityIndicatorView *aiv = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
aiv.center = CGPointMake(baseAlert.bounds.origin.x + baseAlert.bounds.size.width/2, baseAlert.bounds.origin.y +baseAlert.bounds.size.height/2);
[aiv startAnimating];
[baseAlert addSubview:aiv];
//Auto dismiss after 3 seconds
//[self performSelector:@selector(dialogDismiss) withObject:nil afterDelay:3.0f];
}
//取消对话框显示
- (void) dialogDismiss {
[baseAlert dismissWithClickedButtonIndex:0 animated:NO];
}
分享到:
相关推荐
这个源码是一个对话框UIAlertView效果,源码SCLAlertView,有多种类型的UIAlertView,也比较简单的,希望大家能够喜欢。
http://www.jq22.com/demo/uiAlertView201712071705/# 此源代码存在bug,嵌套弹出框时,后面的弹出将无效。 此版本我已修正过,在项目中正常使用。 这里上传的代码含js,css及使用demo。 感谢原作者!
http://blog.csdn.net/zhufuing/article/details/18735371 博文中的demo,Android仿IOS对话框
类似Android中的AlertDialog,可以指定任意的View显示在Alert弹出框中,样式和ios UIAlertView样式一致
iphone中的基础控件UIAlertView,适合初学者,主要学习UIAlertView的常用属性设置、点击事件、添加其他视图到UIAlertView上等
UIAlertView的基本用法与UIAlertViewDelegate对对话框的事件处理方法
最近在学习iOS开发,在牛刀小试的时候发现系统的UIAlertView有点不喜欢,然后就自己自定义了一个UIAlertView,基本上实现了系统的UIAlertView,可以根据项目的需求修改UIAlertView的颜色。有需要的朋友们可以参考借鉴...
http://blog.csdn.net/zhufuing/article/details/18735371博文demo; http://download.csdn.net/detail/zhufuing/6880735升级版
这个程序是在iPhone3.1.3的模拟器测试通过的,如果大家需要定制UIAlertView的Table请下载这个程序,有很好的参考价值
在弹出对话框(Alert dialogue)中加入登录框。即在UIAlertView中加入文字输入框(UITextField)。 注意:请在Mac下解压使用
自定义 UIAlertView
实现有点扁平化设计(Flat UI)味道的弹出对话框效果(UIAlertView),对话框的弹出与消失的动画都很不错,可以自定义对话框的外观。
主要为大家详细介绍了Android仿IOS UIAlertView对话框,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
在弹出对话框(Alert dialogue)中加入列表(UITableView)。 注意:请在Mac下解压使用
1.系统的UIAlertView使用方便,但是有时需要三个按钮,这时的UIAlertView会出现问题,三个按钮的默认摆放位置,不尽人意 2.使用UIAlertView的Delegate,来修改其布局
UIAlertView 的替代品
封装体统的UIAlertView,使用Block传递数据。
LQPopUpView *popUpView = [[LQPopUpView alloc] initWithTitle:@"提示" message:@"这是用第一种初始化方法创建的弹出视图"]; [popUpView addBtnWithTitle:@"取消" type:LQPopUpBtnStyleCancel handler:^{ //...