Rounded rect using UIRectCorner in Swift not working
问题 I am trying to create a rounded rect for the UITableViewCell I have created in a storyboard. I am using Swift 2 in Xcode 7. I have two views in the prototype cell, topView and Bottom view. I want the topView to have its top corners rounds, and the bottomView to have its corners rounded. in awakeFromNib (may go somewhere else better later): ... self.topView.backgroundColor = UIColor.redColor() self.bottomView.backgroundColor = UIColor.grayColor() self.setMaskToView(self.topView, corners