IOS7的UIAlertView 不支持自定义,没法添加subview .ios
不过能够用第三方库git上的下载连接 https://github.com/wimagguc/ios-custom-alertview git
使用方法:github
1.下载spa
2下载以后解压后把其中的.net
3.添加头文件code
在须要使用UIAlertView的地方,添加头文件。blog
#import "CustomIOS7AlertView.h"ip
CustomIOS7AlertView *alertView = [[CustomIOS7AlertView alloc] init]; [alertView setButtonTitles:[NSMutableArray arrayWithObjects:@"取消",@"肯定", nil]];//添加按钮 [alertView setContainerView:youcontroller.view]; [alertView show];
运行结果截图:get
很简单就不作具体介绍了,你们能够下载Demo看看:http://download.csdn.net/detail/superlele123/6986895it
点击右上角Item弹出AlertView.