Created
June 14, 2019 11:04
-
-
Save chaitanyaSoni96/908cad132251de81e368e7c03e6dfb0c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//topLeft Corner | |
nextCatBtn.backgroundColor = .clear | |
let nextBTNborderLayer = CAShapeLayer() | |
nextBTNborderLayer.fillColor = hexStringToUIColor(hex: "#DB3263").cgColor | |
nextBTNborderLayer.borderWidth = 2.0 | |
let nextBtnBorderPath = UIBezierPath(roundedRect: previousCatBtn.bounds, | |
byRoundingCorners: [.topLeft], | |
cornerRadii: CGSize(width:10.0, height: 10.0)) | |
nextBTNborderLayer.path = nextBtnBorderPath.cgPath | |
nextCatBtn.layer.insertSublayer(nextBTNborderLayer, at: 0) | |
//topRight Corner | |
previousCatBtn.backgroundColor = .clear | |
let prevBTNborderLayer = CAShapeLayer() | |
prevBTNborderLayer.fillColor = hexStringToUIColor(hex: "#DB3263").cgColor | |
prevBTNborderLayer.borderWidth = 2.0 | |
let previousBtnBorderPath = UIBezierPath(roundedRect: previousCatBtn.bounds, | |
byRoundingCorners: [.topRight], | |
cornerRadii: CGSize(width:10.0, height: 10.0)) | |
prevBTNborderLayer.path = previousBtnBorderPath.cgPath | |
previousCatBtn.layer.insertSublayer(prevBTNborderLayer, at: 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment