Is it possible to create interaction enabled sidebar solely in the utility area of the storyboard, or does it need any custom UI class?
Related question: How to give shadow like card in iOS
Try this
Create two UIView like this
- Set corner radius to the backView
- Set corner radius to the frontView, only for rightBottom and rightTop portions by using below method
extension UIView {
func roundCorners(_ corners: UIRectCorner, radius: CGFloat) {
let path = UIBezierPath(roundedRect: self.bounds, byRoundingCorners: corners, cornerRadii: CGSize(width: radius, height: radius))
let mask = CAShapeLayer()
mask.path = path.cgPath
self.layer.mask = mask
}
}
Refer my code https://github.com/leninsmannath/CardViewSample.git
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments