more concise constants post translation
This commit is contained in:
parent
57b1aaa3dc
commit
cfebb53719
@ -172,7 +172,7 @@ public class ContactsPicker: OWSViewController, UITableViewDelegate, UITableView
|
||||
let title = NSLocalizedString("INVITE_FLOW_REQUIRES_CONTACT_ACCESS_TITLE", comment: "Alert title when contacts disabled while trying to invite contacts to signal")
|
||||
let body = NSLocalizedString("INVITE_FLOW_REQUIRES_CONTACT_ACCESS_BODY", comment: "Alert body when contacts disabled while trying to invite contacts to signal")
|
||||
|
||||
let alert = UIAlertController(title: title, message: body, preferredStyle: UIAlertController.Style.alert)
|
||||
let alert = UIAlertController(title: title, message: body, preferredStyle: .alert)
|
||||
|
||||
let dismissText = CommonStrings.cancelButton
|
||||
|
||||
|
||||
@ -204,8 +204,8 @@ public class ConversationMediaView: UIView {
|
||||
animatedImageView.contentMode = .scaleAspectFill
|
||||
// Use trilinear filters for better scaling quality at
|
||||
// some performance cost.
|
||||
animatedImageView.layer.minificationFilter = CALayerContentsFilter.trilinear
|
||||
animatedImageView.layer.magnificationFilter = CALayerContentsFilter.trilinear
|
||||
animatedImageView.layer.minificationFilter = .trilinear
|
||||
animatedImageView.layer.magnificationFilter = .trilinear
|
||||
animatedImageView.backgroundColor = Theme.offBackgroundColor
|
||||
addSubview(animatedImageView)
|
||||
animatedImageView.autoPinEdgesToSuperviewEdges()
|
||||
@ -263,8 +263,8 @@ public class ConversationMediaView: UIView {
|
||||
stillImageView.contentMode = .scaleAspectFill
|
||||
// Use trilinear filters for better scaling quality at
|
||||
// some performance cost.
|
||||
stillImageView.layer.minificationFilter = CALayerContentsFilter.trilinear
|
||||
stillImageView.layer.magnificationFilter = CALayerContentsFilter.trilinear
|
||||
stillImageView.layer.minificationFilter = .trilinear
|
||||
stillImageView.layer.magnificationFilter = .trilinear
|
||||
stillImageView.backgroundColor = Theme.offBackgroundColor
|
||||
addSubview(stillImageView)
|
||||
stillImageView.autoPinEdgesToSuperviewEdges()
|
||||
@ -318,8 +318,8 @@ public class ConversationMediaView: UIView {
|
||||
stillImageView.contentMode = .scaleAspectFill
|
||||
// Use trilinear filters for better scaling quality at
|
||||
// some performance cost.
|
||||
stillImageView.layer.minificationFilter = CALayerContentsFilter.trilinear
|
||||
stillImageView.layer.magnificationFilter = CALayerContentsFilter.trilinear
|
||||
stillImageView.layer.minificationFilter = .trilinear
|
||||
stillImageView.layer.magnificationFilter = .trilinear
|
||||
stillImageView.backgroundColor = Theme.offBackgroundColor
|
||||
|
||||
addSubview(stillImageView)
|
||||
|
||||
@ -105,7 +105,7 @@ public class MediaDownloadView: UIView {
|
||||
shapeLayer1.path = bezierPath1.cgPath
|
||||
let fillColor1: UIColor = UIColor(white: 1.0, alpha: 0.4)
|
||||
shapeLayer1.fillColor = fillColor1.cgColor
|
||||
shapeLayer1.fillRule = CAShapeLayerFillRule.evenOdd
|
||||
shapeLayer1.fillRule = .evenOdd
|
||||
|
||||
let bezierPath2 = UIBezierPath()
|
||||
bezierPath2.addArc(withCenter: center, radius: outerRadius, startAngle: startAngle, endAngle: endAngle, clockwise: true)
|
||||
|
||||
@ -110,7 +110,7 @@ public class MediaUploadView: UIView {
|
||||
bezierPath2.append(UIBezierPath(ovalIn: outerCircleBounds))
|
||||
shapeLayer2.path = bezierPath2.cgPath
|
||||
shapeLayer2.fillColor = UIColor(white: 1.0, alpha: 0.4).cgColor
|
||||
shapeLayer2.fillRule = CAShapeLayerFillRule.evenOdd
|
||||
shapeLayer2.fillRule = .evenOdd
|
||||
|
||||
CATransaction.commit()
|
||||
}
|
||||
|
||||
@ -184,7 +184,7 @@ import SignalMessaging
|
||||
path.usesEvenOddFillRule = true
|
||||
|
||||
layer.path = path.cgPath
|
||||
layer.fillRule = CAShapeLayerFillRule.evenOdd
|
||||
layer.fillRule = .evenOdd
|
||||
layer.fillColor = UIColor.black.cgColor
|
||||
layer.opacity = 0.7
|
||||
}
|
||||
|
||||
@ -349,7 +349,7 @@ class GifPickerViewController: OWSViewController, UISearchBarDelegate, UICollect
|
||||
path.append(UIBezierPath(rect: cellRect))
|
||||
|
||||
layer.path = path.cgPath
|
||||
layer.fillRule = CAShapeLayerFillRule.evenOdd
|
||||
layer.fillRule = .evenOdd
|
||||
layer.fillColor = UIColor.black.cgColor
|
||||
layer.opacity = 0.7
|
||||
}
|
||||
|
||||
@ -282,8 +282,8 @@ class MediaGalleryNavigationController: OWSNavigationController {
|
||||
presentationView.isHidden = true
|
||||
presentationView.clipsToBounds = true
|
||||
presentationView.layer.allowsEdgeAntialiasing = true
|
||||
presentationView.layer.minificationFilter = CALayerContentsFilter.trilinear
|
||||
presentationView.layer.magnificationFilter = CALayerContentsFilter.trilinear
|
||||
presentationView.layer.minificationFilter = .trilinear
|
||||
presentationView.layer.magnificationFilter = .trilinear
|
||||
presentationView.contentMode = .scaleAspectFit
|
||||
|
||||
guard let navigationBar = self.navigationBar as? OWSNavigationBar else {
|
||||
|
||||
@ -17,8 +17,8 @@ public class OnboardingSplashViewController: OnboardingBaseViewController {
|
||||
let heroImage = UIImage(named: "onboarding_splash_hero")
|
||||
let heroImageView = UIImageView(image: heroImage)
|
||||
heroImageView.contentMode = .scaleAspectFit
|
||||
heroImageView.layer.minificationFilter = CALayerContentsFilter.trilinear
|
||||
heroImageView.layer.magnificationFilter = CALayerContentsFilter.trilinear
|
||||
heroImageView.layer.minificationFilter = .trilinear
|
||||
heroImageView.layer.magnificationFilter = .trilinear
|
||||
heroImageView.setCompressionResistanceLow()
|
||||
heroImageView.setContentHuggingVerticalLow()
|
||||
heroImageView.accessibilityIdentifier = "onboarding.splash." + "heroImageView"
|
||||
|
||||
@ -138,8 +138,8 @@ public class MediaMessageView: UIView, OWSAudioPlayerDelegate {
|
||||
let audioPlayButton = UIButton()
|
||||
self.audioPlayButton = audioPlayButton
|
||||
setAudioIconToPlay()
|
||||
audioPlayButton.imageView?.layer.minificationFilter = CALayerContentsFilter.trilinear
|
||||
audioPlayButton.imageView?.layer.magnificationFilter = CALayerContentsFilter.trilinear
|
||||
audioPlayButton.imageView?.layer.minificationFilter = .trilinear
|
||||
audioPlayButton.imageView?.layer.magnificationFilter = .trilinear
|
||||
audioPlayButton.addTarget(self, action: #selector(audioPlayButtonPressed), for: .touchUpInside)
|
||||
let buttonSize = createHeroViewSize()
|
||||
audioPlayButton.autoSetDimension(.width, toSize: buttonSize)
|
||||
@ -221,8 +221,8 @@ public class MediaMessageView: UIView, OWSAudioPlayerDelegate {
|
||||
}
|
||||
|
||||
let imageView = UIImageView(image: image)
|
||||
imageView.layer.minificationFilter = CALayerContentsFilter.trilinear
|
||||
imageView.layer.magnificationFilter = CALayerContentsFilter.trilinear
|
||||
imageView.layer.minificationFilter = .trilinear
|
||||
imageView.layer.magnificationFilter = .trilinear
|
||||
let aspectRatio = image.size.width / image.size.height
|
||||
addSubviewWithScaleAspectFitLayout(view: imageView, aspectRatio: aspectRatio)
|
||||
contentView = imageView
|
||||
@ -243,8 +243,8 @@ public class MediaMessageView: UIView, OWSAudioPlayerDelegate {
|
||||
}
|
||||
|
||||
let imageView = UIImageView(image: image)
|
||||
imageView.layer.minificationFilter = CALayerContentsFilter.trilinear
|
||||
imageView.layer.magnificationFilter = CALayerContentsFilter.trilinear
|
||||
imageView.layer.minificationFilter = .trilinear
|
||||
imageView.layer.magnificationFilter = .trilinear
|
||||
let aspectRatio = image.size.width / image.size.height
|
||||
addSubviewWithScaleAspectFitLayout(view: imageView, aspectRatio: aspectRatio)
|
||||
contentView = imageView
|
||||
@ -307,8 +307,8 @@ public class MediaMessageView: UIView, OWSAudioPlayerDelegate {
|
||||
let image = UIImage(named: imageName)
|
||||
assert(image != nil)
|
||||
let imageView = UIImageView(image: image)
|
||||
imageView.layer.minificationFilter = CALayerContentsFilter.trilinear
|
||||
imageView.layer.magnificationFilter = CALayerContentsFilter.trilinear
|
||||
imageView.layer.minificationFilter = .trilinear
|
||||
imageView.layer.magnificationFilter = .trilinear
|
||||
imageView.layer.shadowColor = UIColor.black.cgColor
|
||||
let shadowScaling = 5.0
|
||||
imageView.layer.shadowRadius = CGFloat(2.0 * shadowScaling)
|
||||
|
||||
@ -32,8 +32,8 @@ public class AvatarImageView: UIImageView {
|
||||
func configureView() {
|
||||
self.autoPinToSquareAspectRatio()
|
||||
|
||||
self.layer.minificationFilter = CALayerContentsFilter.trilinear
|
||||
self.layer.magnificationFilter = CALayerContentsFilter.trilinear
|
||||
self.layer.minificationFilter = .trilinear
|
||||
self.layer.magnificationFilter = .trilinear
|
||||
self.layer.masksToBounds = true
|
||||
|
||||
self.layer.addSublayer(self.shadowLayer)
|
||||
@ -57,7 +57,7 @@ public class AvatarImageView: UIImageView {
|
||||
// This can be any color since the fill should be clipped.
|
||||
self.shadowLayer.fillColor = UIColor.black.cgColor
|
||||
self.shadowLayer.path = shadowPath.cgPath
|
||||
self.shadowLayer.fillRule = CAShapeLayerFillRule.evenOdd
|
||||
self.shadowLayer.fillRule = .evenOdd
|
||||
self.shadowLayer.shadowColor = (Theme.isDarkThemeEnabled ? UIColor.white : UIColor.black).cgColor
|
||||
self.shadowLayer.shadowRadius = 0.5
|
||||
self.shadowLayer.shadowOpacity = 0.15
|
||||
@ -203,7 +203,7 @@ public class AvatarImageButton: UIButton {
|
||||
// This can be any color since the fill should be clipped.
|
||||
shadowLayer.fillColor = UIColor.black.cgColor
|
||||
shadowLayer.path = shadowPath.cgPath
|
||||
shadowLayer.fillRule = CAShapeLayerFillRule.evenOdd
|
||||
shadowLayer.fillRule = .evenOdd
|
||||
shadowLayer.shadowColor = (Theme.isDarkThemeEnabled ? UIColor.white : UIColor.black).cgColor
|
||||
shadowLayer.shadowRadius = 0.5
|
||||
shadowLayer.shadowOpacity = 0.15
|
||||
@ -226,8 +226,8 @@ public class AvatarImageButton: UIButton {
|
||||
|
||||
autoPinToSquareAspectRatio()
|
||||
|
||||
layer.minificationFilter = CALayerContentsFilter.trilinear
|
||||
layer.magnificationFilter = CALayerContentsFilter.trilinear
|
||||
layer.minificationFilter = .trilinear
|
||||
layer.magnificationFilter = .trilinear
|
||||
layer.masksToBounds = true
|
||||
layer.addSublayer(shadowLayer)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user