Manos Chorianopoulos

replace resourceBundle

......@@ -22,7 +22,7 @@ class AnalysisHeaderMessageViewCell: UITableViewCell {
super.awakeFromNib()
// image
itemImage.image = UIImage(named: "ic_gift_circle_2", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
itemImage.image = UIImage(named: "ic_gift_circle_2", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
// title
titleLabel.textColor = UIColor(rgb: 0x435563)
......
......@@ -19,7 +19,7 @@ class AnalysisHeaderViewCell: UITableViewCell {
super.awakeFromNib()
// image
itemImage.image = UIImage(named: "ic_gift_circle_2", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
itemImage.image = UIImage(named: "ic_gift_circle_2", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
// title
titleLabel.textColor = UIColor(rgb: 0x435563)
......
......@@ -26,7 +26,7 @@ import UIKit
private extension CSMButton {
func configure() {
setImage(UIImage(named: "ic_directions", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal)
setImage(UIImage(named: "ic_directions", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 18)
setTitleColor(.white, for: .normal)
backgroundColor = UIColor(rgb: 0x79BF14)
......
......@@ -41,13 +41,13 @@ import SwiftEventBus
setBackButton()
// setNavigationTitle("")
backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
// scrollView.clipsToBounds = true
// scrollView.layer.cornerRadius = 30
// scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
let image = UIImage(named: "top_border_line", in: Bundle(for: MyEmptyClass.self), 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
......
......@@ -65,13 +65,14 @@ import AVFoundation
setBackButton()
setNavigationTitle("Εκπτωτικό κουπόνι")
backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
// backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
// scrollView.clipsToBounds = true
// scrollView.layer.cornerRadius = 30
// scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
let image = UIImage(named: "top_border_line", in: Bundle(for: MyEmptyClass.self), 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
......@@ -147,7 +148,7 @@ import AVFoundation
showBarcodeButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 16)
showBarcodeButton.setTitle("Εμφάνιση barcode", for: .normal)
showBarcodeButton.setTitleColor(UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00), for: .normal)
showBarcodeButton.setImage(UIImage(named: "ic_down_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal)
showBarcodeButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
showBarcodeButton.semanticContentAttribute = .forceRightToLeft
showBarcodeButton.tintColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, alpha: 1.00)
showBarcodeButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0);
......@@ -231,7 +232,7 @@ import AVFoundation
// termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5)
termsButton.setTitle("Όροι χρήσης", for: .normal)
termsButton.setTitleColor(UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00), for: .normal)
termsButton.setImage(UIImage(named: "ic_down_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal)
termsButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
termsButton.semanticContentAttribute = .forceRightToLeft
termsButton.tintColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, alpha: 1.00)
termsButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0);
......@@ -271,12 +272,12 @@ import AVFoundation
let targetSize = CGSize(width: termsTextView.frame.width, height: CGFloat(MAXFLOAT))
termsTextViewHeight.constant = termsTextView.sizeThatFits(targetSize).height
termsButton.setImage(UIImage(named: "ic_up_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal)
termsButton.setImage(UIImage(named: "ic_up_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
} else {
termsTextView.isHidden = true
termsTextViewHeight.constant = CGFloat(0)
termsButton.setImage(UIImage(named: "ic_down_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal)
termsButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
}
}
......@@ -301,7 +302,7 @@ import AVFoundation
border2TopSpace.constant = CGFloat(15) // 15
showBarcodeButton.setTitle("Απόκρυψη barcode", for: .normal)
showBarcodeButton.setImage(UIImage(named: "ic_up_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal)
showBarcodeButton.setImage(UIImage(named: "ic_up_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
} else {
barcodeImage.isHidden = true
......@@ -318,7 +319,7 @@ import AVFoundation
border2TopSpace.constant = CGFloat(0) // 15
showBarcodeButton.setTitle("Εμφάνιση barcode", for: .normal)
showBarcodeButton.setImage(UIImage(named: "ic_down_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal)
showBarcodeButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
}
}
......
......@@ -49,13 +49,13 @@ import SwiftEventBus
nonTelcoDialog("Αδυναμία ενεργοποίησης", "Πρόσθεσε σύνδεση COSMOTE σταθερής, κινητής ή TV για να έχεις πρόσβαση στις προσφορές.");
}
backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
// scrollView.clipsToBounds = true
// scrollView.layer.cornerRadius = 30
// scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
let image = UIImage(named: "top_border_line", in: Bundle(for: MyEmptyClass.self), 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
......@@ -101,7 +101,7 @@ import SwiftEventBus
// termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5)
termsButton.setTitle("Όροι χρήσης", for: .normal)
termsButton.setTitleColor(UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00), for: .normal)
termsButton.setImage(UIImage(named: "ic_down_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal)
termsButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
termsButton.semanticContentAttribute = .forceRightToLeft
termsButton.tintColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, alpha: 1.00)
termsButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0);
......@@ -153,12 +153,12 @@ import SwiftEventBus
let targetSize = CGSize(width: termsTextView.frame.width, height: CGFloat(MAXFLOAT))
termsTextViewHeight.constant = termsTextView.sizeThatFits(targetSize).height
termsButton.setImage(UIImage(named: "ic_up_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal)
termsButton.setImage(UIImage(named: "ic_up_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
} else {
termsTextView.isHidden = true
termsTextViewHeight.constant = CGFloat(0)
termsButton.setImage(UIImage(named: "ic_down_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal)
termsButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
}
}
......
......@@ -40,7 +40,7 @@ import UIKit
super.awakeFromNib()
// Initialization code
couponBgImage.image = UIImage(named: "coupon_bg", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
couponBgImage.image = UIImage(named: "coupon_bg", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
borderView.addDashedBorderVertical(color: UIColor(red: 0.44, green: 0.44, blue: 0.44, alpha: 1.00), width: 1.0, height: 110.0)
}
......
......@@ -25,7 +25,7 @@ import SwiftEventBus
setBackButton()
setNavigationTitle("Ενεργά κουπόνια")
backgroundImage.image = UIImage(named: "coupons_scrollview_dark", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
backgroundImage.image = UIImage(named: "coupons_scrollview_dark", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
tableView.delegate = self
tableView.dataSource = self
......
......@@ -71,7 +71,7 @@ import SwiftEventBus
// mainView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
mainView.backgroundColor = UIColor(red: 0.22, green: 0.32, blue: 0.40, alpha: 1.00)
let image = UIImage(named: "top_border_shadow", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)!
let image = UIImage(named: "top_border_shadow", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)!
var aspectR: CGFloat = 0.0
aspectR = image.size.width/image.size.height
......
......@@ -41,7 +41,7 @@ import UIKit
inboxView.layer.shadowRadius = 15.0
inboxView.clipsToBounds = true
newBadgeImage.image = UIImage(named: "new_icon", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
newBadgeImage.image = UIImage(named: "new_icon", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
newBadgeImage.isHidden = true
}
......
......@@ -40,8 +40,8 @@ import UIKit
inboxView.layer.cornerRadius = 5.0
inboxView.clipsToBounds = true
newBadgeImage.image = UIImage(named: "new_icon", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
curvedBgImage.image = UIImage(named: "curved_bg_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
newBadgeImage.image = UIImage(named: "new_icon", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
curvedBgImage.image = UIImage(named: "curved_bg_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
newBadgeImage.isHidden = true
}
......
......@@ -62,7 +62,7 @@ import SwiftEventBus
// mainView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
mainView.backgroundColor = UIColor(red: 0.22, green: 0.32, blue: 0.40, alpha: 1.00)
let image = UIImage(named: "top_border_shadow", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)!
let image = UIImage(named: "top_border_shadow", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)!
var aspectR: CGFloat = 0.0
aspectR = image.size.width/image.size.height
......
......@@ -45,7 +45,7 @@ import MapKit
setBackButton()
setNavigationTitle("Καταστήματα")
backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
mapView.delegate = self
mapView.centerToLocation(initialLocation, regionRadius: 1000000)
......@@ -54,7 +54,7 @@ import MapKit
// mapView.layer.cornerRadius = 30
// mapView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
let image = UIImage(named: "top_border_line", in: Bundle(for: MyEmptyClass.self), 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
......@@ -91,7 +91,7 @@ import MapKit
//directionsButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 16)
directionsButton.setTitle("Οδηγίες", for: .normal)
directionsButton.setImage(UIImage(named: "ic_directions", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal)
directionsButton.setImage(UIImage(named: "ic_directions", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
// directionsButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 5);
// directionsButton.titleEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0);
......
......@@ -76,7 +76,7 @@ protocol NumbersPopupDelegate {
self.preferredContentSize = CGSize(width: widthPopup, height: heightPopup)
closeButton.setImage(UIImage(named: "ic_close_2.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal)
closeButton.setImage(UIImage(named: "ic_close_2.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
closeButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5)
// self.tableView.reloadData()
......
......@@ -51,13 +51,13 @@ import SwiftEventBus
setBackButton()
setNavigationTitle("Κάνε δώρο")
backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
// scrollView.clipsToBounds = true
// scrollView.layer.cornerRadius = 30
// scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
let image = UIImage(named: "top_border_line", in: Bundle(for: MyEmptyClass.self), 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
......@@ -88,7 +88,7 @@ import SwiftEventBus
descriptionLabel.text = "Επίλεξε το κινητό από το οποίο θα γίνει η αποστολή και συμπλήρωσε το COSMOTE κινητό που θα λάβει το δώρο."
senderLabel.text = "Αποστολέας"
senderArrowImage.image = UIImage(named: "ic_down_dark", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
senderArrowImage.image = UIImage(named: "ic_down_dark", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
senderButton.addTarget(self, action: #selector(self.numbersPopupTapped(_:)), for: .touchUpInside)
......
......@@ -52,9 +52,9 @@ import SwiftEventBus
setBackButton("ic_close_2")
setNavigationTitle(ccms?._titleOffer ?? "")
backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
let image = UIImage(named: "top_border_line", in: Bundle(for: MyEmptyClass.self), 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
......@@ -112,7 +112,7 @@ import SwiftEventBus
// 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.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal)
moreButton.setImage(UIImage(named: "ic_down_dark.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.imageEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0);
......@@ -144,12 +144,12 @@ import SwiftEventBus
let targetSize = CGSize(width: moreTextView.frame.width, height: CGFloat(MAXFLOAT))
moreTextViewHeight.constant = moreTextView.sizeThatFits(targetSize).height
moreButton.setImage(UIImage(named: "ic_up_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal)
moreButton.setImage(UIImage(named: "ic_up_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
} else {
moreTextView.isHidden = true
moreTextViewHeight.constant = CGFloat(0)
moreButton.setImage(UIImage(named: "ic_down_dark.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal)
moreButton.setImage(UIImage(named: "ic_down_dark.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
}
}
......
......@@ -50,7 +50,7 @@ extension UIViewController {
let view = UIView(frame: CGRect(x: 0, y: 0, width: 40, height: 40))
let imageView = UIImageView(frame: CGRect(x: 10, y: 10, width: 18, height: 18))
if let imgBackArrow = UIImage(named: icon, in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) {
if let imgBackArrow = UIImage(named: icon, in: MyEmptyClass.resourceBundle(), compatibleWith: nil) {
imageView.image = imgBackArrow
}
view.addSubview(imageView)
......
......@@ -71,11 +71,11 @@ import SwiftEventBus
showDialog("Αδυναμία ενεργοποίησης", "Πρόσθεσε σύνδεση COSMOTE σταθερής, κινητής ή TV για να έχεις πρόσβαση στις προσφορές.");
}
headerImage.image = UIImage(named: "ic_background_circle", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
dfyEarnImage.image = UIImage(named: "wallet_dfy_earn", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
couponEarnImage.image = UIImage(named: "wallet_coupons_2", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
dfyLogoImage.image = UIImage(named: "dfy_logo_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
activeCodeImage.image = UIImage(named: "active_code_logo", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
headerImage.image = UIImage(named: "ic_background_circle", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
dfyEarnImage.image = UIImage(named: "wallet_dfy_earn", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
couponEarnImage.image = UIImage(named: "wallet_coupons_2", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
dfyLogoImage.image = UIImage(named: "dfy_logo_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
activeCodeImage.image = UIImage(named: "active_code_logo", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
profileImage.layer.cornerRadius = 32.5
profileImage.layer.borderWidth = 1
......@@ -84,7 +84,7 @@ import SwiftEventBus
if (profile != nil && !(profile?._image_url is NSNull) && profile?._image_url != nil && profile?._image_url != "") {
profileImage.load(link: profile?._image_url ?? "", placeholder: UIImage(), cache: URLCache())
} else {
profileImage.image = UIImage(named: "default_profile_image", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
profileImage.image = UIImage(named: "default_profile_image", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
}
print("Profile Name: " + (profile?._firstname ?? "") + " " + (profile?._lastname ?? ""))
......@@ -339,7 +339,7 @@ import SwiftEventBus
myPresentsLabel.isHidden = true
}
emptyImage.image = UIImage(named: "ic_empty_wallet", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
emptyImage.image = UIImage(named: "ic_empty_wallet", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
emptyLabel.text = "Δεν έχεις κάποιον ενεργό κωδικό ή κουπόνι! Μπες τώρα στην ενότητα COSMOTE For You και βρες αποκλειστικές προσφορές!"
if (totalCouponValue == 0.0 && loyaltyBadge._couponCount == 0 && dfyCoupons.count == 0 && coupons.count == 0) {
emptyView.isHidden = false
......