-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
187 additions
and
146 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
## 2.2.1 (2019-5-6) | ||
- decreased minimum deployment target to iOS10 | ||
|
||
## 2.2.0 (2019-13-4) | ||
- Swift 5.0 adaptions | ||
|
||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
use_frameworks! | ||
platform :ios, '11.0' | ||
platform :ios, '10.0' | ||
|
||
source 'https://github.com/CocoaPods/Specs.git' | ||
|
||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
27 changes: 23 additions & 4 deletions
27
Jelly/Classes/private/Extensions/UIView+RoundCorners.swift
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,28 @@ | ||
import UIKit | ||
|
||
extension UIView { | ||
public func roundCorners(corners: CACornerMask = [.layerMaxXMaxYCorner,.layerMaxXMinYCorner, .layerMinXMaxYCorner, .layerMinXMinYCorner], radius: CGFloat = 0.0) { | ||
layer.masksToBounds = true | ||
layer.cornerRadius = radius | ||
layer.maskedCorners = corners | ||
func roundCorners(_ corners: CACornerMask, radius: CGFloat) { | ||
if #available(iOS 11, *) { | ||
self.layer.cornerRadius = radius | ||
self.layer.maskedCorners = corners | ||
} else { | ||
var cornerMask = UIRectCorner() | ||
if(corners.contains(.layerMinXMinYCorner)){ | ||
cornerMask.insert(.topLeft) | ||
} | ||
if(corners.contains(.layerMaxXMinYCorner)){ | ||
cornerMask.insert(.topRight) | ||
} | ||
if(corners.contains(.layerMinXMaxYCorner)){ | ||
cornerMask.insert(.bottomLeft) | ||
} | ||
if(corners.contains(.layerMaxXMaxYCorner)){ | ||
cornerMask.insert(.bottomRight) | ||
} | ||
let path = UIBezierPath(roundedRect: self.bounds, byRoundingCorners: cornerMask, cornerRadii: CGSize(width: radius, height: radius)) | ||
let mask = CAShapeLayer() | ||
mask.path = path.cgPath | ||
self.layer.mask = mask | ||
} | ||
} | ||
} |
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