今回の内容

コード
- Main.storyboardで表示するパーツを作成しておきます.
@IBOutlet weak var topWhiteView: UIView!
@IBOutlet weak var beforeResultLabel: UILabel!
@IBOutlet weak var beforeResultDateLabel: UILabel!
@IBOutlet weak var beforeResultLocationLabel: UILabel!
@IBOutlet weak var showSignUpViewButton: UIButton!
Layer
- UILabelは3つとも同じ
.cornerRadius
の値を設定してるので、UILabelを持つ配列を引数にしています。
static func topViewDesign(targetLabels:[UILabel],targetView:UIView,targetButton:UIButton){
targetLabels.forEach({$0.layer.cornerRadius = 13.0; $0.layer.masksToBounds = true})
targetView.layer.cornerRadius = 25.0
targetView.layer.shadowOffset = CGSize(width: 10, height: 10)
targetView.layer.shadowOpacity = 0.65
targetView.layer.shadowRadius = 5
targetButton.layer.cornerRadius = 20.0
targetButton.layer.shadowOffset = CGSize(width: 10, height: 10)
targetButton.layer.shadowOpacity = 0.65
targetButton.layer.shadowRadius = 5
}
tabBar
tabBar.barTintColor = .systemGreen
tabBar.tintColor = .white
tabBar.unselectedItemTintColor = .systemIndigo
tabBar.layer.cornerRadius = 25.0
tabBar.layer.masksToBounds = true
tabBar.layer.maskedCorners = [.layerMaxXMinYCorner,.layerMinXMinYCorner]
AutoLayout

終わり
ご指摘、ご質問などありましたら、コメントまでお願い致します。