override func tableView(_ tableView: UICollectionView,cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withReusEIDentifier: "cell",for: indexPath) cell.layer.cornerRadius = 10 let shadowPath2 = UIBezierPath(rect: cell.bounds) cell.layer.masksToBounds = false cell.layer.shadowColor = UIColor.black.cgColor cell.layer.shadowOffset = CGSize(width: CGFloat(1.0),height: CGFloat(3.0)) cell.layer.shadowOpacity = 0.5 cell.layer.shadowPath = shadowPath2.cgPath return cell }
你可以调整价值,你将获得完美的阴影!
希望能帮助到你!
以上是大佬教程为你收集整理的ios – 带角半径和阴影的SWIFT UITableViewCell全部内容,希望文章能够帮你解决ios – 带角半径和阴影的SWIFT UITableViewCell所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。