_searchBar = [[UISearchBar
alloc]initWithFrame:CGRectMake(0,
0, 320,
44)];
_searchBar.delegate =
self;
//不贴view下拉就会有阴影
UIView *view = [[UIView
alloc] initWithFrame:CGRectMake...
分类:
移动开发 时间:
2014-12-12 20:58:02
阅读次数:
167
NSIndexSet-入门浅析记得上一次,用到,关于删除UITableView分组的方法[tableViewdeleteSections:[NSIndexSetindexSetWithIndex:indexPath.section]withRowAnimation:UITableViewRowAni...
分类:
其他好文 时间:
2014-12-12 16:30:10
阅读次数:
239
转载自:http://chinaxxren.iteye.com/blog/1224223-、建立 UITableView DataTable = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 320, 420)]; [DataTable se...
分类:
其他好文 时间:
2014-12-12 14:37:19
阅读次数:
152
http://blog.jobbole.com/67272/编辑模式下左滑可以显示DELETE按钮。如何可以自定义左滑显示的按钮呢?整体思路1.自定义UITableViewCell,并为其contentView添加左滑时希望显示的按钮。2.在contentView上添加一个相同大小subView,作...
分类:
其他好文 时间:
2014-12-12 11:29:10
阅读次数:
170
- (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ // 取消前一个选中的,就是单选啦 NSIndexPath *lastIndex = [NS...
分类:
其他好文 时间:
2014-12-11 18:53:43
阅读次数:
141
iOS开发系列--UITableView全面解析--UIKit之UITableView概述在iOS开发中UITableView可以说是使用最广泛的控件,我们平时使用的软件中到处都可以看到它的影子,类似于微信、QQ、新浪微博等软件基本上随处都是UITableView。当然它的广泛使用自然离不开它强大的...
分类:
移动开发 时间:
2014-12-11 12:17:22
阅读次数:
226
在iOS8中会发现分割线默认是没有全部显示的,在iOS7中适用的代码if ([self.myCardTableView respondsToSelector:@selector(separatorInset)]) { self.myCardTableView.separatorInse...
分类:
移动开发 时间:
2014-12-11 10:06:41
阅读次数:
169
一、UITableView的属性NSIndexPath类型是用来获取用户选择的indexPath,在别的函数里面,若需要知道用户选择了哪个cell,用上它可以省事很多。不必再去建全局变量section和row。NSIndexPath *tableSelection = [self.tableView...
分类:
其他好文 时间:
2014-12-11 10:02:16
阅读次数:
202
当 UITableView 中有一个 label 的内容比较长的时候,就需要 cell 自适应高度来多行展示label;首先设置 label 的 line 为0;代码如下:// 为每一个 cell 预设置一个高度,可以提高效率- (CGFloat)tableView:(UITableView *)...
分类:
移动开发 时间:
2014-12-10 22:35:18
阅读次数:
218