Model *model = self.modelArr[indexPath.row]; //根据label文字获取CGRect NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc]init]; //se ...
分类:
移动开发 时间:
2016-05-16 19:14:12
阅读次数:
205
-(UITableViewCell*)tableView:(UITableView*)tableViewcellForRowAtIndexPath:(NSIndexPath*)indexPath{staticNSString*CellIdentifier=@"Cell";UITableViewCell*cell=[tableViewdequeueReusableCellWithIdentifier:CellIdentifier];if(0==indexPath.section){cell=[[[UITable..
分类:
移动开发 时间:
2016-05-03 20:39:14
阅读次数:
273
<!--StartFragment--> collectionView Cell 设置颜色,蓝色,但是其他cell颜色也蓝色了,因为只写了if 没写else if (indexPath.item == 0) { cell.backgroundColor = kEssentialColor; }els ...
分类:
其他好文 时间:
2016-05-03 12:07:51
阅读次数:
182
#pragma mark --单元格点击方法- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ DemoControl *arr = self.datalist[in... ...
分类:
其他好文 时间:
2016-05-01 01:03:13
阅读次数:
211
#pragma mark - 代理方法 // 得出方案:在这个方法返回之前就要计算cell的高度 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { LZJS ...
分类:
其他好文 时间:
2016-04-30 16:55:39
阅读次数:
209
//设置播放列表 [self.tableView selectRowAtIndexPath:[NSIndexPath indexPathForRow:self.indexPath inSection:0] animated:YES scrollPosition:UITableViewScrollPo ...
分类:
其他好文 时间:
2016-04-22 23:33:47
阅读次数:
136
自定义cell后,将indexPath参数传递到自定义的cell中(NSIndexPath为cell的一个retain的属性),自定义的cell申明一个协议,里面提供了一个方法 - (void)touchEventAtIndexPath:(NSIndexPath *)indexPath; ..... ...
分类:
其他好文 时间:
2016-04-18 13:23:01
阅读次数:
162
我们先来看看有可能会出现的数组越界Crash的地方; ? 1 2 3 4 5 6 7 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { WelfareItem * ...
分类:
移动开发 时间:
2016-03-26 15:22:51
阅读次数:
393
选中某一行后想要tableView自动滚动使得选中行始终处于table的top、middle或者bottom,使用以下方法中的一个就可以实现: [tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrol
分类:
移动开发 时间:
2016-03-14 13:46:24
阅读次数:
137
刷新固定的行 [_tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone]; [SeletPersonList addObject:str]; if ([selectpers
分类:
其他好文 时间:
2016-03-10 10:43:23
阅读次数:
105