
这是我的单元格代码
-(UItableVIEwCell*)tableVIEw:(UItableVIEw *)tableVIEw cellForRowAtIndexPath:(NSIndexPath *)indexPath{NSMutableArray *leftUtilitybuttons = [NSMutableArray new];[leftUtilitybuttons sw_addUtilitybuttonWithcolor: [UIcolor colorWithRed:0.07 green:0.75f blue:0.16f Alpha:1.0] icon:[UIImage imagenamed:@"about-icon-md.png"]];[leftUtilitybuttons sw_addUtilitybuttonWithcolor: [UIcolor colorWithRed:0.07 green:0.75f blue:0.16f Alpha:1.0] icon:[UIImage imagenamed:@"chat-4-64.png"] ];static Nsstring* IDentifIEr=@"addContactCell";Cell *cell=(Cell *)[tableVIEw dequeueReusableCellWithIDentifIEr:IDentifIEr];Cell __weak * weakCell = cell;[cell setAppearanceWithBlock:^{ weakCell.containingtableVIEw = tableVIEw; weakCell.leftUtilitybuttons = leftUtilitybuttons; weakCell.delegate = self;} force:NO];if (cell==nil){ SWtableVIEwCell *cell = (SWtableVIEwCell *)[tableVIEw dequeueReusableCellWithIDentifIEr:IDentifIEr]; if (cell == nil) { cell = [[SWtableVIEwCell alloc] initWithStyle:UItableVIEwCellStyleSubTitle reuseIDentifIEr:IDentifIEr containingtableVIEw:self.table // Used for row height and selection leftUtilitybuttons:leftUtilitybuttons rightUtilitybuttons:nil]; cell.delegate = self; } return cell; }cell.backgroundcolor=[UIcolor clearcolor];[cell.contentVIEw.layer setbordercolor:[UIcolor colorWithRed:0.15f green:0.47f blue:0.17f Alpha:0.1].CGcolor];[cell.contentVIEw.layer setborderWIDth:1.0f];indexvalueRow = indexPath.row;indexValueSection =indexPath.section;frIEndUser= [self findFrIEndUser];[frIEndUser fetchIfNeededInBackgrounDWithBlock:^(PFObject *object,NSError *error) { if (!error) { if (object) { NSLog(@"frIEnd user = %@",frIEndUser); Nsstring *frIEndname = [Nsstring stringWithFormat:@"%@ %@",frIEndUser[@"Firstname"],frIEndUser[@"Lastname"] ]; cell.nameLabel.text= frIEndname; cell.nameLabel.textcolor = [UIcolor darkGraycolor]; PFfile *userImagefile = frIEndUser[@"profilePic"]; [userImagefile getDataInBackgrounDWithBlock:^(NSData *imageData,NSError *error) { if (!error) { //NSLog(@"%@",imageData); cell.profileImage.image = [UIImage imageWithData:imageData]; } }]; }}}];return cell; }
解决方法 实现这个委托方法也是..- (BOol)swipeabletableVIEwCellShouldHIDeUtilitybuttonsOnSwipe:(SWtableVIEwCell *)cell { return YES;} 总结 以上是内存溢出为你收集整理的ios7 – SWTableViewCell一次显示一个菜单全部内容,希望文章能够帮你解决ios7 – SWTableViewCell一次显示一个菜单所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)