码迷,mamicode.com
首页 >  
搜索关键字:sizeforitemat indexpath    ( 243个结果
tableviewcell 中使用autolayout自适应高度
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ [cell setNeedsUpdateConstraints]; [cell updateC...
分类:其他好文   时间:2015-02-06 18:37:25    阅读次数:100
UITableViewCell中添加多个UIButton实例
在项目中又遇到坑了.UITableViewCell中添加了2个UIButton.点击事件添加在Cell中.cell设置代理,TableViewController类接受代理,并执行相应的方法.根据superView 找到cell,根据cell找到相应的indexpath. 贴代码: - (vo...
分类:其他好文   时间:2015-02-04 08:13:50    阅读次数:201
lable自适应宽度和高度
NSString *nameString = self.dataArray[indexPath.row][@"user"]; NSDictionary *nameLabelAttr=@{NSFontAttributeName:LLShowMessageNameFont}; //// ...
分类:其他好文   时间:2015-01-26 14:56:13    阅读次数:150
didEndEditingRowAtIndexPath with nil indexPath
在UITableViewController中,通过滑动删除按钮删除一行,首先收到Table view data source call:tableView:commitEditingStyle:forRowAtIndexPath在这个调用中,需要首先删除数据,再删除界面上该行:NSMutableA...
分类:其他好文   时间:2015-01-22 15:17:33    阅读次数:198
对于TableViewCell重用机制的理解
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Ce...
分类:其他好文   时间:2015-01-21 16:32:27    阅读次数:95
使用可重用 cell 的两种方式
1. 最常用的方法- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ UITableViewCell *cell = [tableView d....
分类:其他好文   时间:2015-01-11 14:49:07    阅读次数:182
ios8 ios7 tableview cell 分割线左对齐
ios8中左对齐代码//加入如下代码-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{ ...
分类:移动开发   时间:2015-01-10 10:01:19    阅读次数:177
UITableView 删除cell
滑动删除、通过一个按钮控制删除、替换滑动出的deleteUITableVeiw Delete1. 直接滑动删除-(BOOL)tableView:(UITableView*)tableViewcanEditRowAtIndexPath:(NSIndexPath*)indexPath{ returnYE...
分类:其他好文   时间:2015-01-08 17:30:26    阅读次数:159
tableView中deselectRowAtIndexPath的作用
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated...
分类:其他好文   时间:2014-12-29 19:58:54    阅读次数:135
iOS中日期和字符串的相互转化(特殊)
例1、 从服务器段获取到的字符串转化为时间如:转化1416882712000 //网络请求获取的数据 NSString *time = [NSStringstringWithFormat:@"%@",[[dateListobjectAtIndex:indexPath.row]gradeDate]]; NSInteger num = [time integerValue]/1000;(重点) NSDateFormatter *formatter = [[[NSDateFormatteralloc] ...
分类:移动开发   时间:2014-12-26 21:42:13    阅读次数:217
243条   上一页 1 ... 17 18 19 20 21 ... 25 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!