Browse Source

bug fixes

v0.17
stepie.ub 1 year ago
parent
commit
1c9356bf43
  1. 9
      GME Remit.xcodeproj/project.pbxproj
  2. 2
      GME Remit/Modules/Home/User Interface/View/Custom/HomeExchangeRateView.swift
  3. 4
      GME Remit/Modules/Home/User Interface/View/Home.storyboard
  4. 6
      GME Remit/Modules/Home/User Interface/View/HomeViewController.swift
  5. 15
      GME Remit/Modules/RecipientModules/Recipients/User Interface/View/RecipientsViewController.swift
  6. 17
      GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyExchangeRate/User Interface/View/SendMoneyExchangeRateViewController.swift
  7. 71
      GME Remit/Utilities/ExchangeRateCustomView.swift
  8. 33
      GME Remit/Utilities/TabBar Helper/CustomItemTabView.swift
  9. 11
      GME Remit/Utilities/TabBar Helper/CustomTabItem.swift

9
GME Remit.xcodeproj/project.pbxproj

@ -8915,7 +8915,7 @@
CODE_SIGN_ENTITLEMENTS = "GME Remit.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 68KRG7GPAV;
ENABLE_BITCODE = NO;
@ -8935,7 +8935,7 @@
"$(inherited)",
"$(PROJECT_DIR)/GME\\ Remit/ThirdParty/virtualKeyboard/mtk_module",
);
MARKETING_VERSION = 1.6.1;
MARKETING_VERSION = 1.6.2;
ONLY_ACTIVE_ARCH = YES;
"OTHER_CODE_SIGN_FLAGS[sdk=*]" = "--generate-entitlement-der";
OTHER_LDFLAGS = (
@ -8961,11 +8961,12 @@
CODE_SIGN_ENTITLEMENTS = "GME Remit/GME RemitRelease.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 68KRG7GPAV;
ENABLE_BITCODE = NO;
EXCLUDED_ARCHS = "";
"EXCLUDED_ARCHS[sdk=*]" = arm64;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/GME\\ Remit/ThirdParty/virtualKeyboard/mtk_module",
@ -8983,7 +8984,7 @@
"$(inherited)",
"$(PROJECT_DIR)/GME\\ Remit/ThirdParty/virtualKeyboard/mtk_module",
);
MARKETING_VERSION = 1.6.1;
MARKETING_VERSION = 1.6.2;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(OTHER_LDFLAGS)",

2
GME Remit/Modules/Home/User Interface/View/Custom/HomeExchangeRateView.swift

@ -231,7 +231,7 @@ class HomeExchangeRateView: UIView {
func uiPropertiesSetup() {
transferFeeIncludedText.text = ""
guranteedRateText.text = ""
continueButton.setTitle("continue_text".localized(), for: .normal)
continueButton.setTitle("send_money_title_text".localized(), for: .normal)
continueButton.setImage(UIImage(systemName: "arrow.backward"), for: .normal)
continueButton.semanticContentAttribute = .forceRightToLeft
continueButton.backgroundColor = .theme2E89FF

4
GME Remit/Modules/Home/User Interface/View/Home.storyboard

@ -151,7 +151,7 @@
<constraint firstAttribute="height" constant="16" id="sYn-Uo-aPT"/>
</constraints>
<fontDescription key="fontDescription" name="FONTSPRINGDEMO-VolteSemiboldRegular" family="FONTSPRING DEMO - Volte Semibold" pointSize="12"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="textColor" red="0.92941176470588238" green="0.10980392156862745" blue="0.14117647058823529" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="---" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2D3-BA-yV3">
@ -288,7 +288,7 @@
<tabBarItem key="tabBarItem" title="Home" image="branch" id="If6-UM-LN6"/>
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="NbY-y6-481">
<rect key="frame" x="0.0" y="0.0" width="320" height="50"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>

6
GME Remit/Modules/Home/User Interface/View/HomeViewController.swift

@ -397,12 +397,12 @@ class HomeViewController: UIViewController {
self?.presenter?.exchangeCalculate(use: model)
}
exchangeRateView.tappedContinueButton = {
exchangeRateView.tappedContinueButton = { [self] in
UserDefaults.standard.setValue(exchangeRateView.sendMoneyView.text, forKey: "EnteredText")
let dict:[String: Int] = ["index": 1]
NotificationCenter.default.post(
name: self.changeTabbarItem(),
object: nil,
object: exchangeRateView.sendMoneyView.updatedText ?? "",
userInfo: dict
)

15
GME Remit/Modules/RecipientModules/Recipients/User Interface/View/RecipientsViewController.swift

@ -95,6 +95,21 @@ class RecipientsViewController: UIViewController {
super.viewDidAppear(animated)
}
// func addNotiticationConfiguration() {
// NotificationCenter.default.addObserver(
// self,
// selector: #selector(updateText),
// name: Notification.Name.init(rawValue: AppConstants.tabbarItemChangeNotification),
// object: nil
// )
// }
//
// @objc func updateText(_ notification: NSNotification) {
// if let notObj = notification.object as? String, !(notObj ?? "").isEmpty {
// print("Entered text is \(notObj)")
// }
// }
private func addRefreshControl() {
let colorOption = [NSAttributedString.Key.foregroundColor : UIColor.themeWhite]

17
GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyExchangeRate/User Interface/View/SendMoneyExchangeRateViewController.swift

@ -252,8 +252,20 @@ class SendMoneyExchangeRateViewController: UIViewController {
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
// view.endEditing(true)
}
//MARK: This function is added on 29 Jun 2023, to get the amount entered in home screen. Custom tab bar is used so data passing seems complex so Userdefault is.
func addNotiticationConfiguration() {
if let enteredText = UserDefaults.standard.value(forKey: "EnteredText") as? String, !(enteredText ?? "").isEmpty {
senderTextField.text = enteredText
}
}
// MARK: IBActions
@IBAction private func continueButton(_ sender: UIButton) {
// view.endEditing(true)
@ -278,7 +290,10 @@ class SendMoneyExchangeRateViewController: UIViewController {
// all setup should be done here
uiPropertySetup()
addNotiticationConfiguration()
setupTargets()
action = .calculate
senderTextField.delegate = self
@ -312,7 +327,7 @@ class SendMoneyExchangeRateViewController: UIViewController {
recipientGetsTitleLabel.textColor = .themeBlack.withAlphaComponent(0.6)
recipientGetsTitleLabel.font = .sanfrancisco(.semibold, size: 14)
senderTextField.text = "100,000"
senderTextField.text = (senderTextField.text ?? "").isEmpty ? "100,000" : senderTextField.text
// calculateExchangeRate(senderAmount: "100000", reciepientAmount: "0", calcBy: calcBy)
senderTextField.tintColor = .theme2E89FF
senderTextField.textColor = .theme2E89FF

71
GME Remit/Utilities/ExchangeRateCustomView.swift

@ -34,6 +34,38 @@ class ExchangeRateCustomView: UIView {
}
}
var dropdownIcon: UIImageView = {
let dropdownIconImageView = UIImageView()
dropdownIconImageView.image = UIImage.init(named: "dropdown")
dropdownIconImageView.translatesAutoresizingMaskIntoConstraints = false
dropdownIconImageView.clipsToBounds = true
dropdownIconImageView.contentMode = .top
// dropdownIconImageView.ima
// dropdownIconImageView.leadingAnchor.constraint(lessThanOrEqualTo: dropdownIconImageView.trailingAnchor, constant: 4).isActive = true
// dropdownIconImageView.leadingAnchor.constraint(lessThanOrEqualTo: dropdownIconImageView.trailingAnchor, constant: 4).isActive = true
// dropdownIconImageView.anchor(paddingTop: 4, paddingBottom: 4, paddingLeft: 4, paddingRight: 4, width: 16, height: 16)
// dropdownIconImageView.topAnchor.constraint(equalToConstant: 4).isActive = true
// dropdownIconImageView.bottomAnchor.constraint(equalToConstant: 4).isActive = true
// dropdownIconImageView.leftAnchor.constraint(equalToConstant: 4).isActive = true
// dropdownIconImageView.rightAnchor.constraint(equalToConstant: 4).isActive = true
dropdownIconImageView.heightAnchor.constraint(equalToConstant: 16).isActive = true
dropdownIconImageView.widthAnchor.constraint(equalToConstant: 16).isActive = true
return dropdownIconImageView
}()
var dropdownIconView: UIView = {
let imageHolderView = UIView()
imageHolderView.heightAnchor.constraint(equalToConstant: 24).isActive = true
imageHolderView.widthAnchor.constraint(equalToConstant: 24).isActive = true
imageHolderView.backgroundColor = .red
return imageHolderView
}()
private var textfield: CurrencyTextField = {
let textfield = CurrencyTextField()
textfield.keyboardType = .numberPad
@ -62,8 +94,10 @@ class ExchangeRateCustomView: UIView {
var flagImageView: UIImageView = {
let imageView = UIImageView()
imageView.translatesAutoresizingMaskIntoConstraints = false
imageView.heightAnchor.constraint(equalToConstant: 40).isActive = true
imageView.widthAnchor.constraint(equalToConstant: 40).isActive = true
imageView.heightAnchor.constraint(equalToConstant: 52).isActive = true
imageView.widthAnchor.constraint(equalToConstant: 36).isActive = true
imageView.clipsToBounds = true
imageView.contentMode = .scaleAspectFit
return imageView
}()
@ -87,6 +121,7 @@ class ExchangeRateCustomView: UIView {
}
private func uiSetup() {
leftStackView = UIStackView(arrangedSubviews: [titleLabel, textfield])
leftStackView.translatesAutoresizingMaskIntoConstraints = false
leftStackView.axis = .vertical
@ -94,12 +129,31 @@ class ExchangeRateCustomView: UIView {
leftStackView.spacing = 4
leftStackView.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.size.width - 120).isActive = true
rightStackView = UIStackView(arrangedSubviews: [currencyText, flagImageView])
if (isReciver) {
let nameIconHolder = UIStackView(arrangedSubviews: [currencyText, dropdownIcon])
nameIconHolder.translatesAutoresizingMaskIntoConstraints = false
nameIconHolder.axis = .vertical
// nameIconHolder.distribution = .fill
// nameIconHolder.spacing = 2
nameIconHolder.alignment = .center
rightStackView = UIStackView(arrangedSubviews: [flagImageView, nameIconHolder])
rightStackView.backgroundColor = .red
}
else {
rightStackView = UIStackView(arrangedSubviews: [flagImageView, currencyText])
}
// var _imageHolderView = dropdownIconView
// dropdownIcon.center = _imageHolderView.center
// _imageHolderView.addSubview(dropdownIcon)
rightStackView.translatesAutoresizingMaskIntoConstraints = false
rightStackView.axis = .horizontal
rightStackView.distribution = .fillEqually
rightStackView.distribution = .fill
rightStackView.spacing = 8
rightStackView.widthAnchor.constraint(equalToConstant: 120).isActive = true
rightStackView.widthAnchor.constraint(equalToConstant: 96).isActive = true
self.addSubviews(leftStackView,
rightStackView
@ -123,7 +177,7 @@ class ExchangeRateCustomView: UIView {
}
rightStackView.anchor(right: self.trailingAnchor,
paddingRight: -8
paddingRight: 0
)
rightStackView.center(centerX: nil,
@ -131,6 +185,9 @@ class ExchangeRateCustomView: UIView {
centerY: self.centerYAnchor,
paddingY: 0)
rightStackView.heightAnchor.constraint(equalToConstant: 66).isActive = true
rightStackView.topAnchor.constraint(equalTo: self.topAnchor, constant: 0).isActive = true
// rightStackView.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: 0).isActive = true
rightStackView.leadingAnchor.constraint(greaterThanOrEqualTo: leftStackView.trailingAnchor, constant: 8).isActive = true
let tap = UITapGestureRecognizer(target: self, action: #selector(self.handleTap(_:)))
@ -141,7 +198,7 @@ class ExchangeRateCustomView: UIView {
private func propertiesSetup() {
flagImageView.image = UIImage(named: "flag_japan")
currencyText.text = "JPY"
currencyText.textColor = .themeBlack
currencyText.textColor = isReciver ? .white : .themeBlack
currencyText.font = .sanfrancisco(.semibold, size: 16)
titleLabel.textColor = .themeBlack.withAlphaComponent(0.6)

33
GME Remit/Utilities/TabBar Helper/CustomItemTabView.swift

@ -12,6 +12,7 @@ import UIKit
final class CustomItemTabView: UIView {
private let iconImageView = UIImageView()
private let underlineView = UIView()
private let tabName = UILabel()
private let containerView = UIView()
let index: Int
@ -42,13 +43,13 @@ final class CustomItemTabView: UIView {
[ containerView,
iconImageView,
underlineView ].forEach({
underlineView, tabName ].forEach({
$0.translatesAutoresizingMaskIntoConstraints = false
})
addSubview(containerView)
containerView
.addSubviews(underlineView, iconImageView)
.addSubviews(underlineView, iconImageView, tabName)
}
private func setupLayout() {
@ -57,23 +58,41 @@ final class CustomItemTabView: UIView {
containerView.trailingAnchor.constraint(equalTo: self.trailingAnchor).isActive = true
containerView.topAnchor.constraint(equalTo: self.topAnchor).isActive = true
containerView.bottomAnchor.constraint(equalTo: self.bottomAnchor).isActive = true
containerView.heightAnchor.constraint(equalToConstant: 42).isActive = true
containerView.heightAnchor.constraint(equalToConstant: 46).isActive = true
iconImageView.centerXAnchor.constraint(equalTo: containerView.centerXAnchor).isActive = true
iconImageView.centerYAnchor.constraint(equalTo: containerView.centerYAnchor).isActive = true
iconImageView.heightAnchor.constraint(equalToConstant: 24).isActive = true
underlineView.topAnchor.constraint(equalTo: self.containerView.topAnchor, constant: 0).isActive = true
underlineView.leadingAnchor.constraint(equalTo: self.iconImageView.leadingAnchor).isActive = true
underlineView.trailingAnchor.constraint(equalTo: self.iconImageView.trailingAnchor).isActive = true
underlineView.heightAnchor.constraint(equalToConstant: 2).isActive = true
underlineView.centerXAnchor.constraint(equalTo: containerView.centerXAnchor).isActive = true
iconImageView.centerXAnchor.constraint(equalTo: containerView.centerXAnchor).isActive = true
iconImageView.centerYAnchor.constraint(equalTo: containerView.centerYAnchor).isActive = true
iconImageView.heightAnchor.constraint(equalToConstant: 24).isActive = true
iconImageView.widthAnchor.constraint(equalToConstant: 24).isActive = true
iconImageView.topAnchor.constraint(equalTo: underlineView.topAnchor, constant: 12).isActive = true
tabName.centerXAnchor.constraint(equalTo: iconImageView.centerXAnchor).isActive = true
// tabName.heightAnchor.constraint(equalToConstant: 14).isActive = true
// tabName.leadingAnchor.constraint(equalTo: self.iconImageView.leadingAnchor).isActive = true
// tabName.trailingAnchor.constraint(equalTo: self.iconImageView.trailingAnchor).isActive = true
tabName.topAnchor.constraint(equalTo: self.iconImageView.bottomAnchor, constant: 0).isActive = true
}
private func setupProperties() {
underlineView.backgroundColor = .darkBlue
underlineView.set(cornerRadius: 2)
iconImageView.clipsToBounds = true
iconImageView.contentMode = .scaleAspectFit
iconImageView.image = isSelected ? item.selectedIcon : item.icon
tabName.font = .sanfrancisco(.medium, size: 11)
tabName.text = item.title ?? ""
}
private func animateItems() {
@ -84,6 +103,8 @@ final class CustomItemTabView: UIView {
UIView.transition(with: iconImageView,
duration: 0.4,
options: .transitionCrossDissolve) { [unowned self] in
tabName.textColor = isSelected ? .darkBlue : .themeBlack.withAlphaComponent(0.6)
self.iconImageView.image = self.isSelected ? self.item.selectedIcon : self.item.icon
}
}

11
GME Remit/Utilities/TabBar Helper/CustomTabItem.swift

@ -44,6 +44,17 @@ extension CustomTabItem {
}
}
var title: String? {
switch self {
case .home:
return "home_text".localized()
case .sendMoney:
return "receiver_text".localized()
case .profile:
return "profile_text".localized()
}
}
var icon: UIImage? {
switch self {
case .home:

Loading…
Cancel
Save