Answer the question
In order to leave comments, you need to log in
How to get UITableView Cell style with padding of 15 and rounded edges?
Hello.
How to get UITableView Cell style with padding of 15 and rounded edges? I found a lot of information on how to change the size of separator, but together with rounded edges it doesn't work. I need your help. Thanks a lot.
I use:
let columnHeight = CGFloat(60.0)
1.
let viewSeparatorLine = UIView(frame:CGRect(x: 0, y: cell.contentView.frame.size.height - columnHeight, width: cell.contentView.frame.size.width, height: 15))
ИЛИ
2.
let viewSeparatorLine = UIView(frame:CGRect(x: 0, y: cell.contentView.frame.size.height - 15.0, width: cell.contentView.frame.size.width, height: 15))
И
viewSeparatorLine.backgroundColor = UIColor(red: 245/255, green: 245/255, blue: 245/255, alpha: 1.0)
cell.contentView.addSubview(viewSeparatorLine)
Закругление:
cell.layer.cornerRadius = 5
cell.layer.borderColor = UIColor(red: 245/255, green: 245/255, blue: 245/255, alpha: 1.0).cgColor
cell.layer.masksToBounds = true
Answer the question
In order to leave comments, you need to log in
To you need to use UICollectionView .
The author of the question wants to make a collection, but based on a table. There is no such table tool. But you can crutch:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question