Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[*] merge latest code #346

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SKPhotoBrowser/SKAnimator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class SKAnimator: NSObject, SKPhotoBrowserAnimatorDelegate {
guard let window = UIApplication.shared.preferredApplicationWindow else { fatalError() }

let backgroundView = UIView(frame: window.frame)
backgroundView.backgroundColor = SKPhotoBrowserOptions.backgroundColor
backgroundView.backgroundColor = .white
backgroundView.alpha = 0.0
return backgroundView
}()
Expand Down
9 changes: 7 additions & 2 deletions SKPhotoBrowser/SKButtons.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,13 @@ class SKButton: UIButton {
translatesAutoresizingMaskIntoConstraints = true
autoresizingMask = [.flexibleBottomMargin, .flexibleLeftMargin, .flexibleRightMargin, .flexibleTopMargin]

let image = UIImage(named: "SKPhotoBrowser.bundle/images/\(imageName)", in: bundle, compatibleWith: nil) ?? UIImage()
setImage(image, for: .normal)
var image = UIImage(named: "SKPhotoBrowser.bundle/images/\(imageName)",
in: bundle, compatibleWith: nil) ?? UIImage()
// Fix
image = image.withRenderingMode(.alwaysTemplate)
tintColor = .black
// End
setImage(image, for: UIControlState())
}

func setFrameSize(_ size: CGSize? = nil) {
Expand Down
9 changes: 4 additions & 5 deletions SKPhotoBrowser/SKPhotoBrowserOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public struct SKPhotoBrowserOptions {
public static var enableZoomBlackArea: Bool = true
public static var enableSingleTapDismiss: Bool = false

public static var backgroundColor: UIColor = .black
public static var indicatorColor: UIColor = .white
public static var backgroundColor: UIColor = .white
public static var indicatorColor: UIColor = .black
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It affects every developers who are using this. can you kindly consider it.

public static var indicatorStyle: UIActivityIndicatorView.Style = .whiteLarge

/// By default close button is on left side and delete button is on right.
Expand Down Expand Up @@ -59,8 +59,7 @@ public struct SKCaptionOptions {
case basic
case bottom
}

public static var textColor: UIColor = .white
public static var textColor: UIColor = .black
public static var textAlignment: NSTextAlignment = .center
public static var numberOfLine: Int = 3
public static var lineBreakMode: NSLineBreakMode = .byTruncatingTail
Expand All @@ -70,7 +69,7 @@ public struct SKCaptionOptions {
}

public struct SKToolbarOptions {
public static var textColor: UIColor = .white
public static var textColor: UIColor = .black
public static var font: UIFont = .systemFont(ofSize: 17.0)
public static var textShadowColor: UIColor = .black
}
2 changes: 1 addition & 1 deletion SKPhotoBrowser/SKToolbar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private extension SKToolbar {

func setupToolbar() {
toolActionButton = UIBarButtonItem(barButtonSystemItem: .action, target: browser, action: #selector(SKPhotoBrowser.actionButtonPressed))
toolActionButton.tintColor = UIColor.white
toolActionButton.tintColor = UIColor.black

var items = [UIBarButtonItem]()
items.append(UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: self, action: nil))
Expand Down
4 changes: 2 additions & 2 deletions SKPhotoBrowser/SKZoomingScrollView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ open class SKZoomingScrollView: UIScrollView {
imageView = SKDetectingImageView(frame: frame)
imageView.delegate = self
imageView.contentMode = .bottom
imageView.backgroundColor = .clear
imageView.backgroundColor = .white
addSubview(imageView)

// indicator
indicatorView = SKIndicatorView(frame: frame)
addSubview(indicatorView)

// self
backgroundColor = .clear
backgroundColor = .white
delegate = self
showsHorizontalScrollIndicator = SKPhotoBrowserOptions.displayHorizontalScrollIndicator
showsVerticalScrollIndicator = SKPhotoBrowserOptions.displayVerticalScrollIndicator
Expand Down