自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

UITableview中reloaddata cell的label重疊顯示

移動開發(fā) iOS
有沒有碰見過這種情況?UITableview中reloaddata cell的label重疊顯示而不是刷新顯示。本文為大家提出了一個解決方案供大家參考。

使用帶有identifier的cell,寫一個UITableViewCell類,然后在該類中聲明IBOutlet 

  1. @property(nonatomic,strong) IBOutlet UILabel *timeLabel;  

并在storyboard中連接。

在uitableview 中的cellForRowAtIndexPath方法中

  1. static NSString *CellIdentifier = @"meetingCell"
  2.  
  3.     MeetingCell *meetingCell= [tableView dequeueReusableCellWithIdentifier:CellIdentifier];  

并在cell中對label進(jìn)行設(shè)置,這樣的話,就會reloadData后cell會重新加載cell中的東西。

 

責(zé)任編輯:閆佳明 來源: oschina
相關(guān)推薦

2021-11-19 08:12:45

SQL重疊數(shù)據(jù)

2011-08-02 17:14:41

iPhone應(yīng)用 UITableVie

2015-07-23 15:28:50

celluitableview

2013-06-20 11:10:24

iOS開發(fā)UItableView單元格背景漸變

2010-08-13 09:11:11

LabelFlex

2011-08-15 13:44:07

iPhone開發(fā)UITableView

2013-07-18 18:14:26

UITableViewiOS長按手勢UILongPress

2015-02-28 15:55:32

手勢gesture過渡

2011-07-07 16:38:21

iOS UITableVie

2013-06-20 11:21:58

iOS開發(fā)UITableView

2012-04-04 22:36:52

iOS5

2009-04-01 16:26:06

LabelWinFormC#

2010-01-13 09:56:26

linuxifconfig

2013-07-24 15:29:24

思科Sourcefire思科收購Sourcef

2013-04-02 09:37:43

SDN網(wǎng)絡(luò)虛擬化物理網(wǎng)絡(luò)層

2010-03-16 13:12:05

Linux LABEL

2011-07-27 11:14:37

iPhone UITableVie

2011-07-27 11:19:33

iPhone UITableVie

2010-02-06 16:11:33

Frame Layou

2011-08-18 17:32:55

iPhone開發(fā)Table Cell
點贊
收藏

51CTO技術(shù)棧公眾號