From 19686f9fe9fa3ff5875f035848e0355d692e93f1 Mon Sep 17 00:00:00 2001 From: hamed akhlaghi Date: Thu, 20 Jun 2019 12:44:25 +0430 Subject: [PATCH] Ready 1.0.5 closed #261 --- MobileToken copy-Info.plist | 2 +- MobileToken/en.lproj/Localizable.strings | 1 + .../PhoneConfirmationViewController.swift | 2 +- .../help/basic/HelpTableViewAdapter.swift | 3 ++- .../help/basic/HelpTableViewCell.swift | 7 ++----- .../help/basic/HelpViewController.swift | 1 + MobileToken/util/UIHelper.swift | 8 +++++++ .../AuthenticationTypeTableViewCell.xib | 4 ++-- .../view/settings/help/Help.storyboard | 21 +++++++++++++++++-- 9 files changed, 37 insertions(+), 12 deletions(-) diff --git a/MobileToken copy-Info.plist b/MobileToken copy-Info.plist index 0a8e4ac..5276f04 100644 --- a/MobileToken copy-Info.plist +++ b/MobileToken copy-Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.0.4 + 1.0.5 CFBundleVersion 1 InitialToken diff --git a/MobileToken/en.lproj/Localizable.strings b/MobileToken/en.lproj/Localizable.strings index 75773d2..ba16991 100644 --- a/MobileToken/en.lproj/Localizable.strings +++ b/MobileToken/en.lproj/Localizable.strings @@ -73,6 +73,7 @@ "ph_atm_code" = "Code recieved through message"; "ph_password" = "Password"; "ph_confirm_password" = "Confirm password"; +"ph_activation_code" = "Activation Code"; //actionsheet "ash_edit_card_name" = "edit card name"; diff --git a/MobileToken/ui/registration/phoneconfirmation/PhoneConfirmationViewController.swift b/MobileToken/ui/registration/phoneconfirmation/PhoneConfirmationViewController.swift index e65266e..3ec5cf6 100644 --- a/MobileToken/ui/registration/phoneconfirmation/PhoneConfirmationViewController.swift +++ b/MobileToken/ui/registration/phoneconfirmation/PhoneConfirmationViewController.swift @@ -64,7 +64,7 @@ class PhoneConfirmationViewController: BaseViewController,PhoneConfirmationViewP labelPhone.text = phoneNumber labelChangeNumber.isUserInteractionEnabled = true labelEnterCode.font = R.font.iranSansMobile(size: 12) - textFieldCode.attributedPlaceholder = NSAttributedString(string: "کد فعال سازی", + textFieldCode.attributedPlaceholder = NSAttributedString(string: R.string.localizable.ph_activation_code(), attributes: [NSAttributedString.Key.foregroundColor: R.color.buttonColor()!.withAlphaComponent(0.5)]) // initBankNib(bank:self.selectedBank!) } diff --git a/MobileToken/ui/settings/help/basic/HelpTableViewAdapter.swift b/MobileToken/ui/settings/help/basic/HelpTableViewAdapter.swift index dc751f4..34c555c 100644 --- a/MobileToken/ui/settings/help/basic/HelpTableViewAdapter.swift +++ b/MobileToken/ui/settings/help/basic/HelpTableViewAdapter.swift @@ -29,7 +29,8 @@ class HelpTableViewAdapter : NSObject,UITableViewDelegate,UITableViewDataSource func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: R.reuseIdentifier.reuseHelpCell.identifier, for: indexPath) as! HelpTableViewCell - cell.textLabel?.text = dataSource![indexPath.row] + cell.labelQuestion?.textColor = R.color.buttonColor() + cell.labelQuestion.text = dataSource![indexPath.row] cell.selectionStyle = .none return cell } diff --git a/MobileToken/ui/settings/help/basic/HelpTableViewCell.swift b/MobileToken/ui/settings/help/basic/HelpTableViewCell.swift index b5e28fd..1812956 100644 --- a/MobileToken/ui/settings/help/basic/HelpTableViewCell.swift +++ b/MobileToken/ui/settings/help/basic/HelpTableViewCell.swift @@ -1,13 +1,10 @@ import UIKit class HelpTableViewCell: UITableViewCell { - + @IBOutlet var labelQuestion: UILabel! override func awakeFromNib() { super.awakeFromNib() - self.textLabel?.numberOfLines = 0 - self.textLabel?.textAlignment = .right - self.textLabel?.font = R.font.iranSansMobile(size: 16) - self.textLabel?.textColor = R.color.buttonColor() + labelQuestion.font = UIHelper.getFont(size: 16) } override func setSelected(_ selected: Bool, animated: Bool) { diff --git a/MobileToken/ui/settings/help/basic/HelpViewController.swift b/MobileToken/ui/settings/help/basic/HelpViewController.swift index c1fd41c..85adff2 100644 --- a/MobileToken/ui/settings/help/basic/HelpViewController.swift +++ b/MobileToken/ui/settings/help/basic/HelpViewController.swift @@ -2,6 +2,7 @@ import UIKit class HelpViewController: BaseViewController,HelpTableAdapterProtocol { + @IBOutlet var tableView: UITableView! private var adapter : HelpTableViewAdapter? private var index : Int? diff --git a/MobileToken/util/UIHelper.swift b/MobileToken/util/UIHelper.swift index f5b3b1e..f3a56d7 100644 --- a/MobileToken/util/UIHelper.swift +++ b/MobileToken/util/UIHelper.swift @@ -39,6 +39,14 @@ class UIHelper { return R.font.iranSansMobileFaNumMedium(size: size)! } + static func getFont(size: CGFloat)-> UIFont { + if Locale.preferredLanguages[0] == "ar" { + return R.font.iranSansMobileFaNum(size: size)! + } else { + return UIFont.systemFont(ofSize: size) + } + } + static func showFailedSnackBar() { SnackBarHelper.init(message: R.string.localizable.sb_bad_request(),color:R.color.errorDark()!, duration:TTGSnackbarDuration.short).show() } diff --git a/MobileToken/view/nibs/settings/authenticationtype/AuthenticationTypeTableViewCell.xib b/MobileToken/view/nibs/settings/authenticationtype/AuthenticationTypeTableViewCell.xib index 26544a3..eac57df 100644 --- a/MobileToken/view/nibs/settings/authenticationtype/AuthenticationTypeTableViewCell.xib +++ b/MobileToken/view/nibs/settings/authenticationtype/AuthenticationTypeTableViewCell.xib @@ -46,8 +46,8 @@ -