弹出 多个 修改背景的 AlertView
来源:互联网 发布:拆卸软件是什么意思 编辑:程序博客网 时间:2024/06/11 18:33
static UIAlertView *alert = nil;
alert = [[UIAlertView alloc] initWithTitle:promptTitle message:promptMessage delegate:target cancelButtonTitle:cancelBtnTitle otherButtonTitles:nil];
alert.delegate = target;
alert.title = promptTitle;
alert.message = promptMessage;
for (NSString *str in otherBtnTitleArray) {
[alert addButtonWithTitle:str];
}
// [alert show];
// CGSize theSize;
//
// theSize = [alert frame].size;
//
// UIGraphicsBeginImageContext(theSize);
//
// [theImage drawInRect:CGRectMake(0, 0, theSize.width, theSize.height)];
//
// theImage = UIGraphicsGetImageFromCurrentImageContext();
//
// UIGraphicsEndImageContext();
//
// [[alert layer] setContents:(id)[theImage CGImage]];
UIImage *theImage = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"alert.png" ofType:nil]];
UIImageView *backgroundImageView = [[UIImageView alloc] initWithImage:theImage];
backgroundImageView.contentMode = UIViewContentModeScaleToFill;
[alert addSubview:backgroundImageView];
[alert sendSubviewToBack:backgroundImageView];
[alert show];
[alert release];
参考:http://stackoverflow.com/questions/6692361/custom-alertview-with-background
- 弹出 多个 修改背景的 AlertView
- alertView 背景修改
- 针对alertView弹出时的阴影背景的处理方法
- 修改alertview背景,以及按钮背景
- 关于自定义AlertView背景的方法收集
- 关于自定义AlertView背景的方法收集
- 关于自定义AlertView背景的方法收集
- 关于自定义AlertView背景的方法收集
- 关于自定义AlertView背景的方法收集
- iOS_11_tableViewCell的使用alertView修改数据
- 更改AlertView背景
- Flex 修改窗口弹出的模态背景效果
- 自定义弹出窗AlertView
- Swift AlertView 弹出警告框
- 点击按钮弹出遮罩层背景和居于屏幕中间的弹出窗口(结合阿聪世家适当修改)
- 从AlertView例解设置view背景的几种方法
- 从AlertView例解设置view背景的几种方法
- 从AlertView例解设置view背景的几种方法
- mount
- Linux初学
- 为什么选择VC
- 重装VS 2008出现的加载安装组件出错的终极解决方案
- 目录结构及其概述
- 弹出 多个 修改背景的 AlertView
- 究竟啥是上下文(Context) 本人理解
- 在Myeclipse8.5如何安装Jython
- jQuery中animate()函数的用法
- freemarker调用静态方法
- 不借助任何第三方软件,使用笔记本(win7)当路由器供其他无线终端上网
- android Cursor
- POP3邮局协议的一些命令
- Android开发之路之二------第一个程序HelloWord