Author Topic: How to create rounded corners in table view cells  (Read 2508 times)

kjmcneish

  • Administrator
  • *****
  • Posts: 719
    • View Profile
How to create rounded corners in table view cells
« on: August 02, 2015, 07:51:29 PM »
To create rounded corners in a table view cell, just set the cell layer's cornerRadius and maskToBounds properties:

Code: [Select]
self.playRobotCell.layer.cornerRadius = 5
self.playRobotCell.layer.masksToBounds = true

All the best!
Kevin McNeish
Author of Learn to Code in Swift: https://itunes.apple.com/us/book/learn-to-code-in-swift/id942956811?mt=11
Check out our Robot Tic-Tac-Toe app: https://itunes.apple.com/us/app/robot-tic-tac-toe/id990638517?mt=8
« Last Edit: November 15, 2015, 10:22:42 AM by kjmcneish »