@@ -14,7 +14,7 @@ extension UIImageView {
1414 ///
1515 /// During the loading process, this method is also capable to add activity indicator.
1616 /// Change tag value if other method will be called also to change image of the imageview to override again.
17- public func imageFromUrl( urlString: String ? , fallback: UIImage ? , errorCompletion: ( ( _ error: NSError ) -> ( ) ) ? = nil ) {
17+ open func imageFromUrl( urlString: String ? , fallback: UIImage ? , errorCompletion: ( ( _ error: NSError ) -> ( ) ) ? = nil ) {
1818 guard let urlStr = urlString, let url = URL ( string: urlStr) else {
1919 self . image = fallback
2020 return
@@ -29,7 +29,7 @@ extension UIImageView {
2929 - parameter completion: Returns the image that set to imageview even it fallbacks to error. If `fallback` is set, at worst it will return the fallback.
3030 - parameter errorCompletion: This block will be called if any error happens
3131 */
32- public func imageFromUrl( url: URL ? , fallback: UIImage ? ,
32+ open func imageFromUrl( url: URL ? , fallback: UIImage ? ,
3333 errorCompletion: ( ( _ error: NSError ) -> ( ) ) ? = nil ,
3434 completion: ( ( _ image: UIImage ? ) -> ( ) ) ? ) {
3535 guard let url = url else {
@@ -87,11 +87,11 @@ extension UIImageView {
8787}
8888
8989/// Wrapper Class to convert Data to UIImage.
90- class ResponseImage : ResponseBodyParsable {
90+ public class ResponseImage : ResponseBodyParsable {
9191
92- static var shouldUseCustomInitializer : Bool { true }
92+ public static var shouldUseCustomInitializer : Bool { true }
9393 /// holds `UIImage` object inside.
94- var image : UIImage
94+ public var image : UIImage
9595
9696 required init ? ( _ data: Data ) {
9797 guard let image = UIImage ( data: data) else {
@@ -101,19 +101,19 @@ class ResponseImage: ResponseBodyParsable {
101101 self . image = image
102102 }
103103
104- func encode( to encoder: Encoder ) throws {
104+ public func encode( to encoder: Encoder ) throws {
105105
106106 }
107107
108- required init ( from decoder: Decoder ) throws {
108+ required public init ( from decoder: Decoder ) throws {
109109 self . image = UIImage ( )
110110 }
111111
112112 required init ? ( _ response: Any ? ) {
113113 return nil
114114 }
115115
116- func cachingEndsAt( ) -> Date ? {
116+ public func cachingEndsAt( ) -> Date ? {
117117 return Date ( ) . addingTimeInterval ( 60 * 60 )
118118 }
119119
0 commit comments