Manos Chorianopoulos

redesigns TelcoViewController

......@@ -54,22 +54,22 @@ import SwiftEventBus
backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
let image = UIImage(named: "top_border_line", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)!
var aspectR: CGFloat = 0.0
aspectR = image.size.width/image.size.height
topBorderLine.translatesAutoresizingMaskIntoConstraints = false
topBorderLine.image = image
topBorderLine.contentMode = .scaleAspectFill
NSLayoutConstraint.activate([
topBorderLine.topAnchor.constraint(equalTo: mainView.topAnchor, constant: 0),
topBorderLine.leadingAnchor.constraint(equalTo: mainView.leadingAnchor, constant: 0),
topBorderLine.trailingAnchor.constraint(equalTo: mainView.trailingAnchor, constant: 0),
topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width),
topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR)
])
// let image = UIImage(named: "top_border_line", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)!
// var aspectR: CGFloat = 0.0
//
// aspectR = image.size.width/image.size.height
//
// topBorderLine.translatesAutoresizingMaskIntoConstraints = false
// topBorderLine.image = image
// topBorderLine.contentMode = .scaleAspectFill
//
// NSLayoutConstraint.activate([
// topBorderLine.topAnchor.constraint(equalTo: mainView.topAnchor, constant: 0),
// topBorderLine.leadingAnchor.constraint(equalTo: mainView.leadingAnchor, constant: 0),
// topBorderLine.trailingAnchor.constraint(equalTo: mainView.trailingAnchor, constant: 0),
// topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width),
// topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR)
// ])
// scrollView.clipsToBounds = true
// scrollView.layer.cornerRadius = 30
......@@ -91,13 +91,13 @@ import SwiftEventBus
borderLineView.applyGradient(colours: [UIColor(rgb: 0x0AA3CD), UIColor(rgb: 0x6ECA43)], gradient: GradientOrientation.horizontal, cornerRadius: 0.0)
activateButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 18)
activateButton.titleLabel?.font = UIFont(name: "PeridotPE-SemiBold", size: 17)
activateButton.setTitle("Ενεργοποίηση", for: .normal)
activateButton.setTitleColor(.white, for: .normal)
activateButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00)
activateButton.layer.cornerRadius = 8.0
activateButton.frame = CGRect(x: 0.0, y: 0.0, width: activateButton.intrinsicContentSize.width, height: 44)
activateButton.contentEdgeInsets = UIEdgeInsets(top: 1, left: 16, bottom: 0, right: 16)
activateButton.backgroundColor = UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00)
activateButton.layer.cornerRadius = 16.0
activateButton.frame = CGRect(x: 0.0, y: 0.0, width: activateButton.intrinsicContentSize.width, height: 55)
activateButton.contentEdgeInsets = UIEdgeInsets(top: 1, left: 28, bottom: 0, right: 28)
// Fix width for ipad
// if UIDevice.current.userInterfaceIdiom == .pad {
......@@ -108,13 +108,13 @@ import SwiftEventBus
// activateButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true
// }
moreButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Regular", size: 16)
moreButton.titleLabel?.font = UIFont(name: "PeridotPE-Bold", size: 15)
// termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5)
moreButton.setTitle("Δες Περισσότερα", for: .normal)
moreButton.setTitleColor(UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00), for: .normal)
moreButton.setImage(UIImage(named: "ic_down_dark_2.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
moreButton.semanticContentAttribute = .forceRightToLeft
moreButton.tintColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, alpha: 1.00)
moreButton.tintColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 1.00)
moreButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0);
moreButton.titleEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 5);
moreButton.imageView?.layer.transform = CATransform3DMakeScale(0.8, 0.8, 0.8)
......@@ -122,9 +122,9 @@ import SwiftEventBus
// let htmlText = ccms?._description ?? ""
// moreTextView.attributedText = htmlText.htmlToAttributedString
moreTextView.text = ccms?._termsAndConditions ?? ""
moreTextView.font = UIFont(name: "PFSquareSansPro-Regular", size: 13)
moreTextView.textColor = UIColor(rgb: 0x415564)
// moreTextView.textAlignment = .center
moreTextView.font = UIFont(name: "PeridotPE-Regular", size: 16)
moreTextView.textColor = UIColor(red: 0.62, green: 0.62, blue: 0.61, alpha: 1.00)
moreTextView.textAlignment = .left
moreTextView.isScrollEnabled = false
toggleMore()
......