Manos Chorianopoulos

Fix button width for ipad

......@@ -72,6 +72,14 @@ import SwiftEventBus
redeemButton.setTitleColor(.white, for: .normal)
redeemButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00)
redeemButton.layer.cornerRadius = 12.0
// Fix width for ipad
if UIDevice.current.userInterfaceIdiom == .pad {
// iPad
redeemButton.widthAnchor.constraint(equalToConstant: 250).isActive = true
} else {
// not iPad (iPhone, mac, tv, carPlay, unspecified)
redeemButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true
}
}
......
......@@ -118,12 +118,28 @@ import AVFoundation
redeemButton.setTitleColor(.white, for: .normal)
redeemButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00)
redeemButton.layer.cornerRadius = 12.0
// Fix width for ipad
if UIDevice.current.userInterfaceIdiom == .pad {
// iPad
redeemButton.widthAnchor.constraint(equalToConstant: 250).isActive = true
} else {
// not iPad (iPhone, mac, tv, carPlay, unspecified)
redeemButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true
}
mapButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 16)
mapButton.setTitle("Δες τα καταστήματα", for: .normal)
mapButton.setTitleColor(UIColor(red: 0.31, green: 0.62, blue: 0.18, alpha: 1.00), for: .normal)
mapButton.backgroundColor = UIColor(red: 0.90, green: 0.90, blue: 0.90, alpha: 1.00)
mapButton.layer.cornerRadius = 12.0
// Fix width for ipad
if UIDevice.current.userInterfaceIdiom == .pad {
// iPad
mapButton.widthAnchor.constraint(equalToConstant: 250).isActive = true
} else {
// not iPad (iPhone, mac, tv, carPlay, unspecified)
mapButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true
}
termsButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Regular", size: 16)
// termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5)
......
......@@ -79,6 +79,14 @@ import SwiftEventBus
redeemButton.setTitleColor(.white, for: .normal)
redeemButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00)
redeemButton.layer.cornerRadius = 12.0
// Fix width for ipad
if UIDevice.current.userInterfaceIdiom == .pad {
// iPad
redeemButton.widthAnchor.constraint(equalToConstant: 250).isActive = true
} else {
// not iPad (iPhone, mac, tv, carPlay, unspecified)
redeemButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true
}
termsButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 16)
// termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5)
......
......@@ -99,6 +99,14 @@ import SwiftEventBus
redeemButton.setTitleColor(.white, for: .normal)
redeemButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00)
redeemButton.layer.cornerRadius = 12.0
// Fix width for ipad
if UIDevice.current.userInterfaceIdiom == .pad {
// iPad
redeemButton.widthAnchor.constraint(equalToConstant: 250).isActive = true
} else {
// not iPad (iPhone, mac, tv, carPlay, unspecified)
redeemButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true
}
}
......
......@@ -92,6 +92,14 @@ import SwiftEventBus
activateButton.setTitleColor(.white, for: .normal)
activateButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00)
activateButton.layer.cornerRadius = 12.0
// Fix width for ipad
if UIDevice.current.userInterfaceIdiom == .pad {
// iPad
activateButton.widthAnchor.constraint(equalToConstant: 250).isActive = true
} else {
// not iPad (iPhone, mac, tv, carPlay, unspecified)
activateButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true
}
moreButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Regular", size: 16)
// termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5)
......