Showing
19 changed files
with
46 additions
and
45 deletions
No preview for this file type
... | @@ -22,7 +22,7 @@ class AnalysisHeaderMessageViewCell: UITableViewCell { | ... | @@ -22,7 +22,7 @@ class AnalysisHeaderMessageViewCell: UITableViewCell { |
22 | super.awakeFromNib() | 22 | super.awakeFromNib() |
23 | 23 | ||
24 | // image | 24 | // image |
25 | - itemImage.image = UIImage(named: "ic_gift_circle_2", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 25 | + itemImage.image = UIImage(named: "ic_gift_circle_2", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
26 | 26 | ||
27 | // title | 27 | // title |
28 | titleLabel.textColor = UIColor(rgb: 0x435563) | 28 | titleLabel.textColor = UIColor(rgb: 0x435563) | ... | ... |
... | @@ -19,7 +19,7 @@ class AnalysisHeaderViewCell: UITableViewCell { | ... | @@ -19,7 +19,7 @@ class AnalysisHeaderViewCell: UITableViewCell { |
19 | super.awakeFromNib() | 19 | super.awakeFromNib() |
20 | 20 | ||
21 | // image | 21 | // image |
22 | - itemImage.image = UIImage(named: "ic_gift_circle_2", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 22 | + itemImage.image = UIImage(named: "ic_gift_circle_2", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
23 | 23 | ||
24 | // title | 24 | // title |
25 | titleLabel.textColor = UIColor(rgb: 0x435563) | 25 | titleLabel.textColor = UIColor(rgb: 0x435563) | ... | ... |
... | @@ -26,7 +26,7 @@ import UIKit | ... | @@ -26,7 +26,7 @@ import UIKit |
26 | 26 | ||
27 | private extension CSMButton { | 27 | private extension CSMButton { |
28 | func configure() { | 28 | func configure() { |
29 | - setImage(UIImage(named: "ic_directions", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal) | 29 | + setImage(UIImage(named: "ic_directions", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) |
30 | titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 18) | 30 | titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 18) |
31 | setTitleColor(.white, for: .normal) | 31 | setTitleColor(.white, for: .normal) |
32 | backgroundColor = UIColor(rgb: 0x79BF14) | 32 | backgroundColor = UIColor(rgb: 0x79BF14) | ... | ... |
... | @@ -41,13 +41,13 @@ import SwiftEventBus | ... | @@ -41,13 +41,13 @@ import SwiftEventBus |
41 | setBackButton() | 41 | setBackButton() |
42 | // setNavigationTitle("") | 42 | // setNavigationTitle("") |
43 | 43 | ||
44 | - backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 44 | + backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
45 | 45 | ||
46 | // scrollView.clipsToBounds = true | 46 | // scrollView.clipsToBounds = true |
47 | // scrollView.layer.cornerRadius = 30 | 47 | // scrollView.layer.cornerRadius = 30 |
48 | // scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | 48 | // scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius |
49 | 49 | ||
50 | - let image = UIImage(named: "top_border_line", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)! | 50 | + let image = UIImage(named: "top_border_line", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)! |
51 | var aspectR: CGFloat = 0.0 | 51 | var aspectR: CGFloat = 0.0 |
52 | 52 | ||
53 | aspectR = image.size.width/image.size.height | 53 | aspectR = image.size.width/image.size.height | ... | ... |
... | @@ -65,13 +65,14 @@ import AVFoundation | ... | @@ -65,13 +65,14 @@ import AVFoundation |
65 | setBackButton() | 65 | setBackButton() |
66 | setNavigationTitle("Εκπτωτικό κουπόνι") | 66 | setNavigationTitle("Εκπτωτικό κουπόνι") |
67 | 67 | ||
68 | - backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 68 | + // backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) |
69 | + backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) | ||
69 | 70 | ||
70 | // scrollView.clipsToBounds = true | 71 | // scrollView.clipsToBounds = true |
71 | // scrollView.layer.cornerRadius = 30 | 72 | // scrollView.layer.cornerRadius = 30 |
72 | // scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | 73 | // scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius |
73 | 74 | ||
74 | - let image = UIImage(named: "top_border_line", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)! | 75 | + let image = UIImage(named: "top_border_line", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)! |
75 | var aspectR: CGFloat = 0.0 | 76 | var aspectR: CGFloat = 0.0 |
76 | 77 | ||
77 | aspectR = image.size.width/image.size.height | 78 | aspectR = image.size.width/image.size.height |
... | @@ -147,7 +148,7 @@ import AVFoundation | ... | @@ -147,7 +148,7 @@ import AVFoundation |
147 | showBarcodeButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 16) | 148 | showBarcodeButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 16) |
148 | showBarcodeButton.setTitle("Εμφάνιση barcode", for: .normal) | 149 | showBarcodeButton.setTitle("Εμφάνιση barcode", for: .normal) |
149 | showBarcodeButton.setTitleColor(UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00), for: .normal) | 150 | showBarcodeButton.setTitleColor(UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00), for: .normal) |
150 | - showBarcodeButton.setImage(UIImage(named: "ic_down_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal) | 151 | + showBarcodeButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) |
151 | showBarcodeButton.semanticContentAttribute = .forceRightToLeft | 152 | showBarcodeButton.semanticContentAttribute = .forceRightToLeft |
152 | showBarcodeButton.tintColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, alpha: 1.00) | 153 | showBarcodeButton.tintColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, alpha: 1.00) |
153 | showBarcodeButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0); | 154 | showBarcodeButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0); |
... | @@ -231,7 +232,7 @@ import AVFoundation | ... | @@ -231,7 +232,7 @@ import AVFoundation |
231 | // termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5) | 232 | // termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5) |
232 | termsButton.setTitle("Όροι χρήσης", for: .normal) | 233 | termsButton.setTitle("Όροι χρήσης", for: .normal) |
233 | termsButton.setTitleColor(UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00), for: .normal) | 234 | termsButton.setTitleColor(UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00), for: .normal) |
234 | - termsButton.setImage(UIImage(named: "ic_down_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal) | 235 | + termsButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) |
235 | termsButton.semanticContentAttribute = .forceRightToLeft | 236 | termsButton.semanticContentAttribute = .forceRightToLeft |
236 | termsButton.tintColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, alpha: 1.00) | 237 | termsButton.tintColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, alpha: 1.00) |
237 | termsButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0); | 238 | termsButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0); |
... | @@ -271,12 +272,12 @@ import AVFoundation | ... | @@ -271,12 +272,12 @@ import AVFoundation |
271 | let targetSize = CGSize(width: termsTextView.frame.width, height: CGFloat(MAXFLOAT)) | 272 | let targetSize = CGSize(width: termsTextView.frame.width, height: CGFloat(MAXFLOAT)) |
272 | termsTextViewHeight.constant = termsTextView.sizeThatFits(targetSize).height | 273 | termsTextViewHeight.constant = termsTextView.sizeThatFits(targetSize).height |
273 | 274 | ||
274 | - termsButton.setImage(UIImage(named: "ic_up_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal) | 275 | + termsButton.setImage(UIImage(named: "ic_up_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) |
275 | } else { | 276 | } else { |
276 | termsTextView.isHidden = true | 277 | termsTextView.isHidden = true |
277 | termsTextViewHeight.constant = CGFloat(0) | 278 | termsTextViewHeight.constant = CGFloat(0) |
278 | 279 | ||
279 | - termsButton.setImage(UIImage(named: "ic_down_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal) | 280 | + termsButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) |
280 | } | 281 | } |
281 | } | 282 | } |
282 | 283 | ||
... | @@ -301,7 +302,7 @@ import AVFoundation | ... | @@ -301,7 +302,7 @@ import AVFoundation |
301 | border2TopSpace.constant = CGFloat(15) // 15 | 302 | border2TopSpace.constant = CGFloat(15) // 15 |
302 | 303 | ||
303 | showBarcodeButton.setTitle("Απόκρυψη barcode", for: .normal) | 304 | showBarcodeButton.setTitle("Απόκρυψη barcode", for: .normal) |
304 | - showBarcodeButton.setImage(UIImage(named: "ic_up_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal) | 305 | + showBarcodeButton.setImage(UIImage(named: "ic_up_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) |
305 | 306 | ||
306 | } else { | 307 | } else { |
307 | barcodeImage.isHidden = true | 308 | barcodeImage.isHidden = true |
... | @@ -318,7 +319,7 @@ import AVFoundation | ... | @@ -318,7 +319,7 @@ import AVFoundation |
318 | border2TopSpace.constant = CGFloat(0) // 15 | 319 | border2TopSpace.constant = CGFloat(0) // 15 |
319 | 320 | ||
320 | showBarcodeButton.setTitle("Εμφάνιση barcode", for: .normal) | 321 | showBarcodeButton.setTitle("Εμφάνιση barcode", for: .normal) |
321 | - showBarcodeButton.setImage(UIImage(named: "ic_down_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal) | 322 | + showBarcodeButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) |
322 | } | 323 | } |
323 | } | 324 | } |
324 | 325 | ... | ... |
... | @@ -49,13 +49,13 @@ import SwiftEventBus | ... | @@ -49,13 +49,13 @@ import SwiftEventBus |
49 | nonTelcoDialog("Αδυναμία ενεργοποίησης", "Πρόσθεσε σύνδεση COSMOTE σταθερής, κινητής ή TV για να έχεις πρόσβαση στις προσφορές."); | 49 | nonTelcoDialog("Αδυναμία ενεργοποίησης", "Πρόσθεσε σύνδεση COSMOTE σταθερής, κινητής ή TV για να έχεις πρόσβαση στις προσφορές."); |
50 | } | 50 | } |
51 | 51 | ||
52 | - backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 52 | + backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
53 | 53 | ||
54 | // scrollView.clipsToBounds = true | 54 | // scrollView.clipsToBounds = true |
55 | // scrollView.layer.cornerRadius = 30 | 55 | // scrollView.layer.cornerRadius = 30 |
56 | // scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | 56 | // scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius |
57 | 57 | ||
58 | - let image = UIImage(named: "top_border_line", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)! | 58 | + let image = UIImage(named: "top_border_line", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)! |
59 | var aspectR: CGFloat = 0.0 | 59 | var aspectR: CGFloat = 0.0 |
60 | 60 | ||
61 | aspectR = image.size.width/image.size.height | 61 | aspectR = image.size.width/image.size.height |
... | @@ -101,7 +101,7 @@ import SwiftEventBus | ... | @@ -101,7 +101,7 @@ import SwiftEventBus |
101 | // termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5) | 101 | // termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5) |
102 | termsButton.setTitle("Όροι χρήσης", for: .normal) | 102 | termsButton.setTitle("Όροι χρήσης", for: .normal) |
103 | termsButton.setTitleColor(UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00), for: .normal) | 103 | termsButton.setTitleColor(UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00), for: .normal) |
104 | - termsButton.setImage(UIImage(named: "ic_down_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal) | 104 | + termsButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) |
105 | termsButton.semanticContentAttribute = .forceRightToLeft | 105 | termsButton.semanticContentAttribute = .forceRightToLeft |
106 | termsButton.tintColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, alpha: 1.00) | 106 | termsButton.tintColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, alpha: 1.00) |
107 | termsButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0); | 107 | termsButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0); |
... | @@ -153,12 +153,12 @@ import SwiftEventBus | ... | @@ -153,12 +153,12 @@ import SwiftEventBus |
153 | let targetSize = CGSize(width: termsTextView.frame.width, height: CGFloat(MAXFLOAT)) | 153 | let targetSize = CGSize(width: termsTextView.frame.width, height: CGFloat(MAXFLOAT)) |
154 | termsTextViewHeight.constant = termsTextView.sizeThatFits(targetSize).height | 154 | termsTextViewHeight.constant = termsTextView.sizeThatFits(targetSize).height |
155 | 155 | ||
156 | - termsButton.setImage(UIImage(named: "ic_up_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal) | 156 | + termsButton.setImage(UIImage(named: "ic_up_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) |
157 | } else { | 157 | } else { |
158 | termsTextView.isHidden = true | 158 | termsTextView.isHidden = true |
159 | termsTextViewHeight.constant = CGFloat(0) | 159 | termsTextViewHeight.constant = CGFloat(0) |
160 | 160 | ||
161 | - termsButton.setImage(UIImage(named: "ic_down_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal) | 161 | + termsButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) |
162 | } | 162 | } |
163 | } | 163 | } |
164 | 164 | ... | ... |
... | @@ -40,7 +40,7 @@ import UIKit | ... | @@ -40,7 +40,7 @@ import UIKit |
40 | super.awakeFromNib() | 40 | super.awakeFromNib() |
41 | // Initialization code | 41 | // Initialization code |
42 | 42 | ||
43 | - couponBgImage.image = UIImage(named: "coupon_bg", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 43 | + couponBgImage.image = UIImage(named: "coupon_bg", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
44 | 44 | ||
45 | borderView.addDashedBorderVertical(color: UIColor(red: 0.44, green: 0.44, blue: 0.44, alpha: 1.00), width: 1.0, height: 110.0) | 45 | borderView.addDashedBorderVertical(color: UIColor(red: 0.44, green: 0.44, blue: 0.44, alpha: 1.00), width: 1.0, height: 110.0) |
46 | } | 46 | } | ... | ... |
... | @@ -25,7 +25,7 @@ import SwiftEventBus | ... | @@ -25,7 +25,7 @@ import SwiftEventBus |
25 | setBackButton() | 25 | setBackButton() |
26 | setNavigationTitle("Ενεργά κουπόνια") | 26 | setNavigationTitle("Ενεργά κουπόνια") |
27 | 27 | ||
28 | - backgroundImage.image = UIImage(named: "coupons_scrollview_dark", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 28 | + backgroundImage.image = UIImage(named: "coupons_scrollview_dark", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
29 | 29 | ||
30 | tableView.delegate = self | 30 | tableView.delegate = self |
31 | tableView.dataSource = self | 31 | tableView.dataSource = self | ... | ... |
... | @@ -71,7 +71,7 @@ import SwiftEventBus | ... | @@ -71,7 +71,7 @@ import SwiftEventBus |
71 | // mainView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | 71 | // mainView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius |
72 | mainView.backgroundColor = UIColor(red: 0.22, green: 0.32, blue: 0.40, alpha: 1.00) | 72 | mainView.backgroundColor = UIColor(red: 0.22, green: 0.32, blue: 0.40, alpha: 1.00) |
73 | 73 | ||
74 | - let image = UIImage(named: "top_border_shadow", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)! | 74 | + let image = UIImage(named: "top_border_shadow", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)! |
75 | var aspectR: CGFloat = 0.0 | 75 | var aspectR: CGFloat = 0.0 |
76 | 76 | ||
77 | aspectR = image.size.width/image.size.height | 77 | aspectR = image.size.width/image.size.height | ... | ... |
... | @@ -41,7 +41,7 @@ import UIKit | ... | @@ -41,7 +41,7 @@ import UIKit |
41 | inboxView.layer.shadowRadius = 15.0 | 41 | inboxView.layer.shadowRadius = 15.0 |
42 | inboxView.clipsToBounds = true | 42 | inboxView.clipsToBounds = true |
43 | 43 | ||
44 | - newBadgeImage.image = UIImage(named: "new_icon", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 44 | + newBadgeImage.image = UIImage(named: "new_icon", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
45 | 45 | ||
46 | newBadgeImage.isHidden = true | 46 | newBadgeImage.isHidden = true |
47 | } | 47 | } | ... | ... |
... | @@ -40,8 +40,8 @@ import UIKit | ... | @@ -40,8 +40,8 @@ import UIKit |
40 | inboxView.layer.cornerRadius = 5.0 | 40 | inboxView.layer.cornerRadius = 5.0 |
41 | inboxView.clipsToBounds = true | 41 | inboxView.clipsToBounds = true |
42 | 42 | ||
43 | - newBadgeImage.image = UIImage(named: "new_icon", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 43 | + newBadgeImage.image = UIImage(named: "new_icon", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
44 | - curvedBgImage.image = UIImage(named: "curved_bg_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 44 | + curvedBgImage.image = UIImage(named: "curved_bg_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
45 | 45 | ||
46 | newBadgeImage.isHidden = true | 46 | newBadgeImage.isHidden = true |
47 | } | 47 | } | ... | ... |
... | @@ -62,7 +62,7 @@ import SwiftEventBus | ... | @@ -62,7 +62,7 @@ import SwiftEventBus |
62 | // mainView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | 62 | // mainView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius |
63 | mainView.backgroundColor = UIColor(red: 0.22, green: 0.32, blue: 0.40, alpha: 1.00) | 63 | mainView.backgroundColor = UIColor(red: 0.22, green: 0.32, blue: 0.40, alpha: 1.00) |
64 | 64 | ||
65 | - let image = UIImage(named: "top_border_shadow", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)! | 65 | + let image = UIImage(named: "top_border_shadow", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)! |
66 | var aspectR: CGFloat = 0.0 | 66 | var aspectR: CGFloat = 0.0 |
67 | 67 | ||
68 | aspectR = image.size.width/image.size.height | 68 | aspectR = image.size.width/image.size.height | ... | ... |
... | @@ -45,7 +45,7 @@ import MapKit | ... | @@ -45,7 +45,7 @@ import MapKit |
45 | setBackButton() | 45 | setBackButton() |
46 | setNavigationTitle("Καταστήματα") | 46 | setNavigationTitle("Καταστήματα") |
47 | 47 | ||
48 | - backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 48 | + backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
49 | 49 | ||
50 | mapView.delegate = self | 50 | mapView.delegate = self |
51 | mapView.centerToLocation(initialLocation, regionRadius: 1000000) | 51 | mapView.centerToLocation(initialLocation, regionRadius: 1000000) |
... | @@ -54,7 +54,7 @@ import MapKit | ... | @@ -54,7 +54,7 @@ import MapKit |
54 | // mapView.layer.cornerRadius = 30 | 54 | // mapView.layer.cornerRadius = 30 |
55 | // mapView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | 55 | // mapView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius |
56 | 56 | ||
57 | - let image = UIImage(named: "top_border_line", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)! | 57 | + let image = UIImage(named: "top_border_line", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)! |
58 | var aspectR: CGFloat = 0.0 | 58 | var aspectR: CGFloat = 0.0 |
59 | 59 | ||
60 | aspectR = image.size.width/image.size.height | 60 | aspectR = image.size.width/image.size.height |
... | @@ -91,7 +91,7 @@ import MapKit | ... | @@ -91,7 +91,7 @@ import MapKit |
91 | 91 | ||
92 | //directionsButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 16) | 92 | //directionsButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 16) |
93 | directionsButton.setTitle("Οδηγίες", for: .normal) | 93 | directionsButton.setTitle("Οδηγίες", for: .normal) |
94 | - directionsButton.setImage(UIImage(named: "ic_directions", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal) | 94 | + directionsButton.setImage(UIImage(named: "ic_directions", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) |
95 | 95 | ||
96 | // directionsButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 5); | 96 | // directionsButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 5); |
97 | // directionsButton.titleEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0); | 97 | // directionsButton.titleEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0); | ... | ... |
... | @@ -76,7 +76,7 @@ protocol NumbersPopupDelegate { | ... | @@ -76,7 +76,7 @@ protocol NumbersPopupDelegate { |
76 | 76 | ||
77 | self.preferredContentSize = CGSize(width: widthPopup, height: heightPopup) | 77 | self.preferredContentSize = CGSize(width: widthPopup, height: heightPopup) |
78 | 78 | ||
79 | - closeButton.setImage(UIImage(named: "ic_close_2.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal) | 79 | + closeButton.setImage(UIImage(named: "ic_close_2.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) |
80 | closeButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5) | 80 | closeButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5) |
81 | 81 | ||
82 | // self.tableView.reloadData() | 82 | // self.tableView.reloadData() | ... | ... |
... | @@ -51,13 +51,13 @@ import SwiftEventBus | ... | @@ -51,13 +51,13 @@ import SwiftEventBus |
51 | setBackButton() | 51 | setBackButton() |
52 | setNavigationTitle("Κάνε δώρο") | 52 | setNavigationTitle("Κάνε δώρο") |
53 | 53 | ||
54 | - backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 54 | + backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
55 | 55 | ||
56 | // scrollView.clipsToBounds = true | 56 | // scrollView.clipsToBounds = true |
57 | // scrollView.layer.cornerRadius = 30 | 57 | // scrollView.layer.cornerRadius = 30 |
58 | // scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | 58 | // scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius |
59 | 59 | ||
60 | - let image = UIImage(named: "top_border_line", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)! | 60 | + let image = UIImage(named: "top_border_line", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)! |
61 | var aspectR: CGFloat = 0.0 | 61 | var aspectR: CGFloat = 0.0 |
62 | 62 | ||
63 | aspectR = image.size.width/image.size.height | 63 | aspectR = image.size.width/image.size.height |
... | @@ -88,7 +88,7 @@ import SwiftEventBus | ... | @@ -88,7 +88,7 @@ import SwiftEventBus |
88 | descriptionLabel.text = "Επίλεξε το κινητό από το οποίο θα γίνει η αποστολή και συμπλήρωσε το COSMOTE κινητό που θα λάβει το δώρο." | 88 | descriptionLabel.text = "Επίλεξε το κινητό από το οποίο θα γίνει η αποστολή και συμπλήρωσε το COSMOTE κινητό που θα λάβει το δώρο." |
89 | 89 | ||
90 | senderLabel.text = "Αποστολέας" | 90 | senderLabel.text = "Αποστολέας" |
91 | - senderArrowImage.image = UIImage(named: "ic_down_dark", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 91 | + senderArrowImage.image = UIImage(named: "ic_down_dark", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
92 | 92 | ||
93 | senderButton.addTarget(self, action: #selector(self.numbersPopupTapped(_:)), for: .touchUpInside) | 93 | senderButton.addTarget(self, action: #selector(self.numbersPopupTapped(_:)), for: .touchUpInside) |
94 | 94 | ... | ... |
... | @@ -52,9 +52,9 @@ import SwiftEventBus | ... | @@ -52,9 +52,9 @@ import SwiftEventBus |
52 | setBackButton("ic_close_2") | 52 | setBackButton("ic_close_2") |
53 | setNavigationTitle(ccms?._titleOffer ?? "") | 53 | setNavigationTitle(ccms?._titleOffer ?? "") |
54 | 54 | ||
55 | - backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 55 | + backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
56 | 56 | ||
57 | - let image = UIImage(named: "top_border_line", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)! | 57 | + let image = UIImage(named: "top_border_line", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)! |
58 | var aspectR: CGFloat = 0.0 | 58 | var aspectR: CGFloat = 0.0 |
59 | 59 | ||
60 | aspectR = image.size.width/image.size.height | 60 | aspectR = image.size.width/image.size.height |
... | @@ -112,7 +112,7 @@ import SwiftEventBus | ... | @@ -112,7 +112,7 @@ import SwiftEventBus |
112 | // termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5) | 112 | // termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5) |
113 | moreButton.setTitle("Δες Περισσότερα", for: .normal) | 113 | moreButton.setTitle("Δες Περισσότερα", for: .normal) |
114 | moreButton.setTitleColor(UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00), for: .normal) | 114 | moreButton.setTitleColor(UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00), for: .normal) |
115 | - moreButton.setImage(UIImage(named: "ic_down_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal) | 115 | + moreButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) |
116 | moreButton.semanticContentAttribute = .forceRightToLeft | 116 | moreButton.semanticContentAttribute = .forceRightToLeft |
117 | moreButton.tintColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, alpha: 1.00) | 117 | moreButton.tintColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, alpha: 1.00) |
118 | moreButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0); | 118 | moreButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0); |
... | @@ -144,12 +144,12 @@ import SwiftEventBus | ... | @@ -144,12 +144,12 @@ import SwiftEventBus |
144 | let targetSize = CGSize(width: moreTextView.frame.width, height: CGFloat(MAXFLOAT)) | 144 | let targetSize = CGSize(width: moreTextView.frame.width, height: CGFloat(MAXFLOAT)) |
145 | moreTextViewHeight.constant = moreTextView.sizeThatFits(targetSize).height | 145 | moreTextViewHeight.constant = moreTextView.sizeThatFits(targetSize).height |
146 | 146 | ||
147 | - moreButton.setImage(UIImage(named: "ic_up_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal) | 147 | + moreButton.setImage(UIImage(named: "ic_up_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) |
148 | } else { | 148 | } else { |
149 | moreTextView.isHidden = true | 149 | moreTextView.isHidden = true |
150 | moreTextViewHeight.constant = CGFloat(0) | 150 | moreTextViewHeight.constant = CGFloat(0) |
151 | 151 | ||
152 | - moreButton.setImage(UIImage(named: "ic_down_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal) | 152 | + moreButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) |
153 | } | 153 | } |
154 | } | 154 | } |
155 | 155 | ... | ... |
... | @@ -50,7 +50,7 @@ extension UIViewController { | ... | @@ -50,7 +50,7 @@ extension UIViewController { |
50 | let view = UIView(frame: CGRect(x: 0, y: 0, width: 40, height: 40)) | 50 | let view = UIView(frame: CGRect(x: 0, y: 0, width: 40, height: 40)) |
51 | let imageView = UIImageView(frame: CGRect(x: 10, y: 10, width: 18, height: 18)) | 51 | let imageView = UIImageView(frame: CGRect(x: 10, y: 10, width: 18, height: 18)) |
52 | 52 | ||
53 | - if let imgBackArrow = UIImage(named: icon, in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) { | 53 | + if let imgBackArrow = UIImage(named: icon, in: MyEmptyClass.resourceBundle(), compatibleWith: nil) { |
54 | imageView.image = imgBackArrow | 54 | imageView.image = imgBackArrow |
55 | } | 55 | } |
56 | view.addSubview(imageView) | 56 | view.addSubview(imageView) | ... | ... |
... | @@ -71,11 +71,11 @@ import SwiftEventBus | ... | @@ -71,11 +71,11 @@ import SwiftEventBus |
71 | showDialog("Αδυναμία ενεργοποίησης", "Πρόσθεσε σύνδεση COSMOTE σταθερής, κινητής ή TV για να έχεις πρόσβαση στις προσφορές."); | 71 | showDialog("Αδυναμία ενεργοποίησης", "Πρόσθεσε σύνδεση COSMOTE σταθερής, κινητής ή TV για να έχεις πρόσβαση στις προσφορές."); |
72 | } | 72 | } |
73 | 73 | ||
74 | - headerImage.image = UIImage(named: "ic_background_circle", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 74 | + headerImage.image = UIImage(named: "ic_background_circle", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
75 | - dfyEarnImage.image = UIImage(named: "wallet_dfy_earn", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 75 | + dfyEarnImage.image = UIImage(named: "wallet_dfy_earn", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
76 | - couponEarnImage.image = UIImage(named: "wallet_coupons_2", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 76 | + couponEarnImage.image = UIImage(named: "wallet_coupons_2", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
77 | - dfyLogoImage.image = UIImage(named: "dfy_logo_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 77 | + dfyLogoImage.image = UIImage(named: "dfy_logo_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
78 | - activeCodeImage.image = UIImage(named: "active_code_logo", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 78 | + activeCodeImage.image = UIImage(named: "active_code_logo", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
79 | 79 | ||
80 | profileImage.layer.cornerRadius = 32.5 | 80 | profileImage.layer.cornerRadius = 32.5 |
81 | profileImage.layer.borderWidth = 1 | 81 | profileImage.layer.borderWidth = 1 |
... | @@ -84,7 +84,7 @@ import SwiftEventBus | ... | @@ -84,7 +84,7 @@ import SwiftEventBus |
84 | if (profile != nil && !(profile?._image_url is NSNull) && profile?._image_url != nil && profile?._image_url != "") { | 84 | if (profile != nil && !(profile?._image_url is NSNull) && profile?._image_url != nil && profile?._image_url != "") { |
85 | profileImage.load(link: profile?._image_url ?? "", placeholder: UIImage(), cache: URLCache()) | 85 | profileImage.load(link: profile?._image_url ?? "", placeholder: UIImage(), cache: URLCache()) |
86 | } else { | 86 | } else { |
87 | - profileImage.image = UIImage(named: "default_profile_image", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 87 | + profileImage.image = UIImage(named: "default_profile_image", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
88 | } | 88 | } |
89 | 89 | ||
90 | print("Profile Name: " + (profile?._firstname ?? "") + " " + (profile?._lastname ?? "")) | 90 | print("Profile Name: " + (profile?._firstname ?? "") + " " + (profile?._lastname ?? "")) |
... | @@ -339,7 +339,7 @@ import SwiftEventBus | ... | @@ -339,7 +339,7 @@ import SwiftEventBus |
339 | myPresentsLabel.isHidden = true | 339 | myPresentsLabel.isHidden = true |
340 | } | 340 | } |
341 | 341 | ||
342 | - emptyImage.image = UIImage(named: "ic_empty_wallet", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 342 | + emptyImage.image = UIImage(named: "ic_empty_wallet", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
343 | emptyLabel.text = "Δεν έχεις κάποιον ενεργό κωδικό ή κουπόνι! Μπες τώρα στην ενότητα COSMOTE For You και βρες αποκλειστικές προσφορές!" | 343 | emptyLabel.text = "Δεν έχεις κάποιον ενεργό κωδικό ή κουπόνι! Μπες τώρα στην ενότητα COSMOTE For You και βρες αποκλειστικές προσφορές!" |
344 | if (totalCouponValue == 0.0 && loyaltyBadge._couponCount == 0 && dfyCoupons.count == 0 && coupons.count == 0) { | 344 | if (totalCouponValue == 0.0 && loyaltyBadge._couponCount == 0 && dfyCoupons.count == 0 && coupons.count == 0) { |
345 | emptyView.isHidden = false | 345 | emptyView.isHidden = false | ... | ... |
-
Please register or login to post a comment