Skip to content

Commit

Permalink
Rename image property
Browse files Browse the repository at this point in the history
  • Loading branch information
mono0926 committed May 28, 2017
1 parent 7929dd2 commit da88052
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion NativePopup/NativePopup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class NativePopup: UIView {
message: String?) {
effectView = UIVisualEffectView(effect: UIBlurEffect(style: .extraLight))

let imageValue = image.image
let imageValue = image.npImage
imageValue.validate()
switch imageValue {
case .image(let image):
Expand Down
2 changes: 1 addition & 1 deletion NativePopup/Preset.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public struct Preset {
}
}

public var image: Image {
public var npImage: Image {
switch self {
case .good, .bad:
return .image(UIImage(nativePopupNamed: "feedback_\(rawValue)"))
Expand Down
8 changes: 4 additions & 4 deletions NativePopup/UIImageConvertible.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public enum Image {
}

public protocol ImageConvertible {
var image: Image { get }
var npImage: Image { get }
var additionalMarginTop: CGFloat { get }
var additionalMarginBottom: CGFloat { get }
}
Expand All @@ -37,13 +37,13 @@ extension ImageConvertible {
}

extension UIImage: ImageConvertible {
public var image: Image { return .image(self) }
public var npImage: Image { return .image(self) }
}

extension Character: ImageConvertible {
public var image: Image { return .emoji(self) }
public var npImage: Image { return .emoji(self) }
}

extension UIView: ImageConvertible {
public var image: Image { return .view(self) }
public var npImage: Image { return .view(self) }
}

0 comments on commit da88052

Please sign in to comment.