ios - How to avoid relayout of content in a tableview? -


here read in cells , table view performance guide :

avoid relayout of content. when reusing cells custom subviews, refrain laying out subviews each time table view requests cell. lay out subviews once, when cell created.

what mean ?

am applying :

override func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell {     let cell = tableview.dequeuereusablecellwithidentifier("customcell", forindexpath: indexpath) as! customcell     cell.customcelldescription.text = data[indexpath.row]     return cell } 

what you're doing fine. putting data in label (or whatever is), not moving around. cellforrowatindexpath — apply cell data corresponds index path.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -