Я получаю эту странную ошибку при прокруткеЯрлык текст отсутствует при прокрутке в UITableView
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("MessageCell", forIndexPath: indexPath) as! ChatTableNewViewCell
let msgtype=CoreDataManager.read(EntityNames.ChatEntity, attributeName: "is_mobile", index: indexPath.row)
if msgtype == "Y" {
cell.lblRecivedMsg.hidden=true
cell.lblSendMsg.text=CoreDataManager.read(EntityNames.ChatEntity, attributeName: "message", index: indexPath.row)
}
else{
cell.lblSendMsg.hidden=true
cell.lblRecivedMsg.text=CoreDataManager.read(EntityNames.ChatEntity, attributeName: "message", index: indexPath.row)
}
cell.lblRecivedMsg.layer.borderColor = UIColor.blackColor().CGColor
cell.lblRecivedMsg.layer.borderWidth = 1
cell.lblRecivedMsg.layer.masksToBounds = false
cell.lblRecivedMsg.layer.cornerRadius = 8
cell.lblRecivedMsg.clipsToBounds = true
cell.lblSendMsg.layer.borderColor = UIColor.blackColor().CGColor
cell.lblSendMsg.layer.borderWidth = 1
cell.lblSendMsg.layer.masksToBounds = false
cell.lblSendMsg.layer.cornerRadius = 8
cell.lblSendMsg.clipsToBounds = true
// Configure the cell...
cell.backgroundColor = UIColor.clearColor()
println(indexPath.row)
return cell
}
Это происходит как в тренажере и в IPAD, кроме того, он Безразлично всегда бывает только тогда, когда мы прокручиваем очень быстро или прокручиваем пару раз. Это действительно раздражает :(. Пожалуйста, помогите
вы можете разместить остальную часть кода, имеющие отношение к установке ячейки? – ABakerSmith
@ABakerSmith я обновил код. r ваша помощь :) – vinbhai4u
Не могли бы вы объяснить, что происходит (отредактируйте свой вопрос; *** не *** публикуйте его в комментариях) или уточните, были ли вы уже? Похоже, ваша проблема в том, что сообщения исчезают, но это сложно сказать. –