Answers for "uitableview cell programmatically swift"

1

swift uitableview cell spacing

// Inside UITableViewCell subclass
override func layoutSubviews() {    
    super.layoutSubviews()

    contentView.frame = contentView.frame.inset(by: UIEdgeInsets(top: 8, left: 8, bottom: 8, right: 8))
}
Posted by: Guest on March-25-2020
0

tableview cell animation swift

func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) {
    cell.layer.transform = CATransform3DMakeScale(0.1,0.1,1)
    UIView.animateWithDuration(0.25, animations: {
        cell.layer.transform = CATransform3DMakeScale(1,1,1)
    })

}
Posted by: Guest on January-03-2021
1

swift uitableview insert cell

self.yourArray.append(msg)

self.tblView.beginUpdates()
self.tblView.insertRows(at: [IndexPath.init(row: self.yourArray.count-1, section: 0)], with: .automatic)
self.tblView.endUpdates()
Posted by: Guest on March-09-2020

Code answers related to "uitableview cell programmatically swift"

Code answers related to "Swift"

Browse Popular Code Answers by Language