- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ [cell setNeedsUpdateConstraints]; [cell updateC...
分类:
其他好文 时间:
2015-02-06 18:37:25
阅读次数:
100
在项目中又遇到坑了.UITableViewCell中添加了2个UIButton.点击事件添加在Cell中.cell设置代理,TableViewController类接受代理,并执行相应的方法.根据superView 找到cell,根据cell找到相应的indexpath. 贴代码: - (vo...
分类:
其他好文 时间:
2015-02-04 08:13:50
阅读次数:
201
NSString *nameString = self.dataArray[indexPath.row][@"user"]; NSDictionary *nameLabelAttr=@{NSFontAttributeName:LLShowMessageNameFont}; //// ...
分类:
其他好文 时间:
2015-01-26 14:56:13
阅读次数:
150
在UITableViewController中,通过滑动删除按钮删除一行,首先收到Table view data source call:tableView:commitEditingStyle:forRowAtIndexPath在这个调用中,需要首先删除数据,再删除界面上该行:NSMutableA...
分类:
其他好文 时间:
2015-01-22 15:17:33
阅读次数:
198
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Ce...
分类:
其他好文 时间:
2015-01-21 16:32:27
阅读次数:
95
1. 最常用的方法- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ UITableViewCell *cell = [tableView d....
分类:
其他好文 时间:
2015-01-11 14:49:07
阅读次数:
182
ios8中左对齐代码//加入如下代码-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{ ...
分类:
移动开发 时间:
2015-01-10 10:01:19
阅读次数:
177
滑动删除、通过一个按钮控制删除、替换滑动出的deleteUITableVeiw Delete1. 直接滑动删除-(BOOL)tableView:(UITableView*)tableViewcanEditRowAtIndexPath:(NSIndexPath*)indexPath{ returnYE...
分类:
其他好文 时间:
2015-01-08 17:30:26
阅读次数:
159
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated...
分类:
其他好文 时间:
2014-12-29 19:58:54
阅读次数:
135
例1、 从服务器段获取到的字符串转化为时间如:转化1416882712000
//网络请求获取的数据
NSString *time = [NSStringstringWithFormat:@"%@",[[dateListobjectAtIndex:indexPath.row]gradeDate]];
NSInteger num = [time integerValue]/1000;(重点)
NSDateFormatter *formatter = [[[NSDateFormatteralloc] ...
分类:
移动开发 时间:
2014-12-26 21:42:13
阅读次数:
217