Remove top gradient from attachment approval.

pull/2/head
Matthew Chen 7 years ago
parent 102eed8bab
commit 745ec2adb8

@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "chevron-left-shadow-24@1x.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "chevron-left-shadow-24@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "chevron-left-shadow-24@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 972 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "chevron-right-shadow-24@1x.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "chevron-right-shadow-24@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "chevron-right-shadow-24@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

@ -190,10 +190,19 @@ public class AttachmentApprovalViewController: UIPageViewController, UIPageViewC
let hasCancel = (mode != .sharedNavigation)
if hasCancel {
let cancelButton = UIBarButtonItem(barButtonSystemItem: .cancel,
target: self, action: #selector(cancelPressed))
cancelButton.tintColor = .white
self.navigationItem.leftBarButtonItem = cancelButton
// Mimic a UIBarButtonItem of type .cancel, but with a shadow.
let cancelButton = OWSButton(title: CommonStrings.cancelButton) { [weak self] in
self?.cancelPressed()
}
cancelButton.setTitleColor(.white, for: .normal)
if let titleLabel = cancelButton.titleLabel {
titleLabel.font = UIFont.systemFont(ofSize: 18.0)
titleLabel.layer.shadowColor = UIColor.black.cgColor
titleLabel.layer.shadowRadius = 2.0
titleLabel.layer.shadowOpacity = 0.66
titleLabel.layer.shadowOffset = .zero
}
navigationItem.leftBarButtonItem = UIBarButtonItem(customView: cancelButton)
} else {
// Note: using a custom leftBarButtonItem breaks the interactive pop gesture.
self.navigationItem.leftBarButtonItem = self.createOWSBackButton()
@ -507,7 +516,7 @@ public class AttachmentApprovalViewController: UIPageViewController, UIPageViewC
// MARK: - Event Handlers
@objc func cancelPressed(sender: UIButton) {
private func cancelPressed() {
self.approvalDelegate?.attachmentApproval(self, didCancelAttachments: attachments)
}
}

@ -140,16 +140,6 @@ public class AttachmentPrepViewController: OWSViewController, PlayerProgressBarD
}
#endif
if isZoomable {
// Add top and bottom gradients to ensure toolbar controls are legible
// when placed over image/video preview which may be a clashing color.
let topGradient = GradientView(from: backgroundColor, to: UIColor.clear)
self.view.addSubview(topGradient)
topGradient.autoPinWidthToSuperview()
topGradient.autoPinEdge(toSuperviewEdge: .top)
topGradient.autoSetDimension(.height, toSize: ScaleFromIPhone5(60))
}
// Hide the play button embedded in the MediaView and replace it with our own.
// This allows us to zoom in on the media view without zooming in on the button
if attachment.isVideo {

Loading…
Cancel
Save