Manos Chorianopoulos

fix header back button size

...@@ -13,9 +13,9 @@ extension UIViewController { ...@@ -13,9 +13,9 @@ extension UIViewController {
13 13
14 let backButton = UIButton(type: UIButton.ButtonType.custom) as UIButton 14 let backButton = UIButton(type: UIButton.ButtonType.custom) as UIButton
15 if (icon == "ic_close") { 15 if (icon == "ic_close") {
16 - backButton.frame = CGRect(x: 0, y: 0, width: uiscreen.height * 0.025, height: uiscreen.height * 0.025) 16 + backButton.frame = CGRect(x: 0, y: 0, width: uiscreen.height * 0.035, height: uiscreen.height * 0.035)
17 } else { 17 } else {
18 - backButton.frame = CGRect(x: 0, y: 0, width: uiscreen.height * 0.025, height: uiscreen.height * 0.02) 18 + backButton.frame = CGRect(x: 0, y: 0, width: uiscreen.height * 0.035, height: uiscreen.height * 0.03)
19 } 19 }
20 backButton.imageView!.contentMode = .scaleAspectFit 20 backButton.imageView!.contentMode = .scaleAspectFit
21 //backButton.setBackgroundImage(UIImage(named:Assets.Navigation.backButton), for: UIControlState()) 21 //backButton.setBackgroundImage(UIImage(named:Assets.Navigation.backButton), for: UIControlState())
...@@ -27,12 +27,12 @@ extension UIViewController { ...@@ -27,12 +27,12 @@ extension UIViewController {
27 backButton.translatesAutoresizingMaskIntoConstraints = false 27 backButton.translatesAutoresizingMaskIntoConstraints = false
28 // Add width, height constraints 28 // Add width, height constraints
29 if (icon == "ic_close") { 29 if (icon == "ic_close") {
30 - let widthContraints = NSLayoutConstraint(item: backButton, attribute: NSLayoutConstraint.Attribute.width, relatedBy: NSLayoutConstraint.Relation.equal, toItem: nil, attribute: NSLayoutConstraint.Attribute.notAnAttribute, multiplier: 1, constant: uiscreen.height * 0.025) 30 + let widthContraints = NSLayoutConstraint(item: backButton, attribute: NSLayoutConstraint.Attribute.width, relatedBy: NSLayoutConstraint.Relation.equal, toItem: nil, attribute: NSLayoutConstraint.Attribute.notAnAttribute, multiplier: 1, constant: uiscreen.height * 0.035)
31 - let heightContraints = NSLayoutConstraint(item: backButton, attribute: NSLayoutConstraint.Attribute.height, relatedBy: NSLayoutConstraint.Relation.equal, toItem: nil, attribute: NSLayoutConstraint.Attribute.notAnAttribute, multiplier: 1, constant: uiscreen.height * 0.025) 31 + let heightContraints = NSLayoutConstraint(item: backButton, attribute: NSLayoutConstraint.Attribute.height, relatedBy: NSLayoutConstraint.Relation.equal, toItem: nil, attribute: NSLayoutConstraint.Attribute.notAnAttribute, multiplier: 1, constant: uiscreen.height * 0.035)
32 NSLayoutConstraint.activate([heightContraints,widthContraints]) 32 NSLayoutConstraint.activate([heightContraints,widthContraints])
33 } else { 33 } else {
34 - let widthContraints = NSLayoutConstraint(item: backButton, attribute: NSLayoutConstraint.Attribute.width, relatedBy: NSLayoutConstraint.Relation.equal, toItem: nil, attribute: NSLayoutConstraint.Attribute.notAnAttribute, multiplier: 1, constant: uiscreen.height * 0.025) 34 + let widthContraints = NSLayoutConstraint(item: backButton, attribute: NSLayoutConstraint.Attribute.width, relatedBy: NSLayoutConstraint.Relation.equal, toItem: nil, attribute: NSLayoutConstraint.Attribute.notAnAttribute, multiplier: 1, constant: uiscreen.height * 0.035)
35 - let heightContraints = NSLayoutConstraint(item: backButton, attribute: NSLayoutConstraint.Attribute.height, relatedBy: NSLayoutConstraint.Relation.equal, toItem: nil, attribute: NSLayoutConstraint.Attribute.notAnAttribute, multiplier: 1, constant: uiscreen.height * 0.02) 35 + let heightContraints = NSLayoutConstraint(item: backButton, attribute: NSLayoutConstraint.Attribute.height, relatedBy: NSLayoutConstraint.Relation.equal, toItem: nil, attribute: NSLayoutConstraint.Attribute.notAnAttribute, multiplier: 1, constant: uiscreen.height * 0.03)
36 NSLayoutConstraint.activate([heightContraints,widthContraints]) 36 NSLayoutConstraint.activate([heightContraints,widthContraints])
37 } 37 }
38 38
......