自定义UIAlertView
2015-09-02 13:58
531 查看
You can change accessoryView to any own customContentView in a standard alert view in iOS7
Note that you must call this before [alertView show].
Simplest illustrating example:
Real tableView as the subview of UIAlertView example:
[alertView setValue:customContentView forKey:@"accessoryView"];
Note that you must call this before [alertView show].
Simplest illustrating example:
UIAlertView *av = [[UIAlertView alloc] initWithTitle:@"TEST" message:@"subview" delegate:nil cancelButtonTitle:@"NO" otherButtonTitles:@"YES", nil]; UIView *v = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 50)]; v.backgroundColor = [UIColor yellowColor]; [av setValue:v forKey:@"accessoryView"]; [av show];
Real tableView as the subview of UIAlertView example:
相关文章推荐
- 集成环信:Warning! ivar size mismatch in PSUICollectionView_ - can't change the superclass.解决办法
- Easy UI DataGrid 导出Excel表格
- EasyUI-datagrid分页查询前端显示
- leetcode笔记:Permutation Sequence
- UI:target-action设计模式、手势识别器
- Algorithms—96.Unique Binary Search Trees
- 怎么入门iOS之OC_UI晋级学什么、
- [LeetCode]N-Queens II
- UML建模之时序图(Sequence Diagram)
- Android的线程使用来更新UI----Thread、Handler、Looper、TimerTask等
- Android 教你打造炫酷的ViewPagerIndicator 不仅仅是高仿MIUI
- Java中字符串探索—-String ,StringBuffer ,StringBuilder及字符串缓存池
- 转 -- MVC+EF easyui dataGrid 动态加载分页表格
- OS开发UI篇—Quartz2D简单使用
- mosquitto_pub和mosquitto_sub 命令参数说明
- 遍历一个map,从中取得key 和value。不知道key的情况下取value。
- LeetCode "Closest Binary Search Tree Value II"
- PAT-01-复杂度2 Maximum Subsequence Sum
- 改变UISearchBar的文本颜色
- 关于aque.h头文件