chandra mohan
chandra mohan

Reputation: 337

why tableview cells are starts flickering when they are going to be reused?

I'm building a chat interface. I'm using multiple types of tableView cells in UITableView. Table view cells are start flickering when new cell is added into tableView from reusablecell. I'm dequeuing tableview cells with following piece of code. How get scrolling smooth with out any flickering.

tableView.dequeueReusableCellWithIdentifier("MessageLessonTableViewCell") as! MessageLessonTableViewCell

Upvotes: 3

Views: 2013

Answers (1)

Vishal Sonawane
Vishal Sonawane

Reputation: 2693

The main reason for flickering is that, tableView is getting data to be attached late in time. So when you scroll, it takes time to switch from one type of tableViewCell to another. Plus you might be doing DB operations in cellForRowAtIndexPath which delays in returning tbaleViewCell. For implementing Smooth scrolling refer this

Upvotes: 1

Related Questions