Skip to content

Commit 503f360

Browse files
committed
Set class to public
1 parent 6620c62 commit 503f360

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

ShadowView/ShadowView/ShadowView+BlurProcess.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import UIKit
1010

1111
extension ShadowView{
1212

13-
func addImageView(){
13+
internal func addImageView(){
1414

1515
guard shadowImageView == nil else {
1616
return
@@ -26,7 +26,7 @@ extension ShadowView{
2626

2727

2828

29-
func updateShadow(){
29+
public func updateShadow(){
3030

3131
self.shadowImageView.image = nil
3232
DispatchQueue.global(qos: DispatchQoS.QoSClass.utility).async { [weak self] in

ShadowView/ShadowView/ShadowView.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,52 +8,52 @@
88

99
import UIKit
1010

11-
class ShadowView: UIView {
11+
public class ShadowView: UIView {
1212

1313
internal var blurRadius :CGFloat = 5.0
14-
var shadowImageView : UIImageView!
15-
let scaleImageConstant :CGFloat = 3
16-
var correctShadowScale : CGFloat{
14+
public var shadowImageView : UIImageView!
15+
internal let scaleImageConstant :CGFloat = 3
16+
public var correctShadowScale : CGFloat{
1717
return shadowScale + scaleImageConstant - 1
1818
}
1919

20-
override init(frame: CGRect) {
20+
public override init(frame: CGRect) {
2121
super.init(frame: frame)
2222
addImageView()
2323
}
2424

25-
required init?(coder aDecoder: NSCoder) {
25+
public required init?(coder aDecoder: NSCoder) {
2626
super.init(coder: aDecoder)
2727
addImageView()
2828
}
2929

30-
@IBInspectable var shadowScale : CGFloat = 1{
30+
@IBInspectable public var shadowScale : CGFloat = 1{
3131
didSet{
3232
layoutSubviews()
3333
}
3434
}
3535

36-
@IBInspectable var shadowSaturation : CGFloat = 1{
36+
@IBInspectable public var shadowSaturation : CGFloat = 1{
3737
didSet{
3838
updateShadow()
3939
}
4040
}
4141
private var shadowTintColor : UIColor?
42-
override var shadowColor: UIColor?{
42+
public override var shadowColor: UIColor?{
4343
get{
4444
return shadowTintColor
4545
}set{
4646
shadowTintColor = newValue
4747
}
4848
}
4949

50-
override public var shadowOffset : CGSize{
50+
public override var shadowOffset : CGSize{
5151
didSet{
5252
layoutSubviews()
5353
}
5454
}
5555

56-
override public var shadowRadius : CGFloat{
56+
public override var shadowRadius : CGFloat{
5757
set{
5858
blurRadius = newValue
5959
updateShadow()
@@ -63,7 +63,7 @@ class ShadowView: UIView {
6363
}
6464
}
6565

66-
override var shadowOpacity: Float{
66+
public override var shadowOpacity: Float{
6767
set{
6868
shadowImageView.alpha = CGFloat(newValue)
6969
}
@@ -72,13 +72,13 @@ class ShadowView: UIView {
7272
}
7373
}
7474

75-
override func didMoveToSuperview() {
75+
public override func didMoveToSuperview() {
7676
super.didMoveToSuperview()
7777
updateShadow()
7878
}
7979

8080
//Reload the image if the view changed.
81-
override func layoutSubviews() {
81+
public override func layoutSubviews() {
8282
super.layoutSubviews()
8383

8484
shadowImageView.frame.size = frame.size.scaled(by: correctShadowScale)

ShadowView/ShadowView/UIView+Image.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ import UIKit
1111
extension UIView{
1212

1313
///Returns a UIImage copy of the view
14-
var asImage : UIImage{
14+
internal var asImage : UIImage{
1515
return layer.asImage
1616
}
1717
}
1818

1919
extension CALayer{
2020

2121
///Returns a UIImage copy of the layer
22-
var asImage : UIImage{
22+
internal var asImage : UIImage{
2323
UIGraphicsBeginImageContext(frame.size)
2424
render(in: UIGraphicsGetCurrentContext()!)
2525
let image = UIGraphicsGetImageFromCurrentImageContext()

ShadowView/ShadowView/UIView+Shadow.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ extension UIView{
4949
}
5050
}
5151

52-
@IBInspectable var shadowPath : CGPath?{
52+
@IBInspectable public var shadowPath : CGPath?{
5353
set{
5454
layer.shadowPath = newValue
5555
}

0 commit comments

Comments
 (0)