diff --git a/GMERemittance.xcodeproj/project.pbxproj b/GMERemittance.xcodeproj/project.pbxproj index bda21d7f..f3e9f58c 100644 --- a/GMERemittance.xcodeproj/project.pbxproj +++ b/GMERemittance.xcodeproj/project.pbxproj @@ -458,6 +458,8 @@ D99D72AA212D595B00601F48 /* CountryInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = D99D72A9212D595B00601F48 /* CountryInfo.swift */; }; D9B39677214F7DDC0072A9B8 /* ImageCroper.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9B39675214F7DDC0072A9B8 /* ImageCroper.swift */; }; D9B39678214F7DDC0072A9B8 /* MultiMediaManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9B39676214F7DDC0072A9B8 /* MultiMediaManager.swift */; }; + D9B414402161AD2000A53D9D /* TransactionHistoryDatePicker.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D9B4143F2161AD2000A53D9D /* TransactionHistoryDatePicker.storyboard */; }; + D9B414422161AE2800A53D9D /* DatePickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9B414412161AE2800A53D9D /* DatePickerViewController.swift */; }; D9B7ADF02130048E009B0564 /* ExchangeRatesModuleInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9B7ADDD2130048E009B0564 /* ExchangeRatesModuleInterface.swift */; }; D9B7ADF12130048E009B0564 /* ExchangeRatesService.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9B7ADE02130048E009B0564 /* ExchangeRatesService.swift */; }; D9B7ADF22130048E009B0564 /* ExchangeRatesServiceType.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9B7ADE12130048E009B0564 /* ExchangeRatesServiceType.swift */; }; @@ -978,6 +980,8 @@ D99D72A9212D595B00601F48 /* CountryInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CountryInfo.swift; sourceTree = ""; }; D9B39675214F7DDC0072A9B8 /* ImageCroper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageCroper.swift; sourceTree = ""; }; D9B39676214F7DDC0072A9B8 /* MultiMediaManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MultiMediaManager.swift; sourceTree = ""; }; + D9B4143F2161AD2000A53D9D /* TransactionHistoryDatePicker.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = TransactionHistoryDatePicker.storyboard; sourceTree = ""; }; + D9B414412161AE2800A53D9D /* DatePickerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DatePickerViewController.swift; sourceTree = ""; }; D9B7ADDD2130048E009B0564 /* ExchangeRatesModuleInterface.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExchangeRatesModuleInterface.swift; sourceTree = ""; }; D9B7ADE02130048E009B0564 /* ExchangeRatesService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExchangeRatesService.swift; sourceTree = ""; }; D9B7ADE12130048E009B0564 /* ExchangeRatesServiceType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExchangeRatesServiceType.swift; sourceTree = ""; }; @@ -3289,6 +3293,8 @@ D977859A215DC55E00754079 /* TransactionHistory.storyboard */, D977859B215DC55E00754079 /* TransactionHistoryViewController.swift */, D977859C215DC55E00754079 /* TransactionHistoryViewInterface.swift */, + D9B4143F2161AD2000A53D9D /* TransactionHistoryDatePicker.storyboard */, + D9B414412161AE2800A53D9D /* DatePickerViewController.swift */, ); path = View; sourceTree = ""; @@ -3599,6 +3605,7 @@ 049B6ED0203ADCF3003D6F62 /* gme-logo.png in Resources */, 040C814A20626A7D00989076 /* Reward.storyboard in Resources */, 5565FF201FE275E5002934E9 /* SanFranciscoDisplay-Ultralight.otf in Resources */, + D9B414402161AD2000A53D9D /* TransactionHistoryDatePicker.storyboard in Resources */, 5565FF2F1FE275E5002934E9 /* SanFranciscoDisplay-Thin.otf in Resources */, 5565FF1D1FE275E5002934E9 /* SanFranciscoDisplay-Heavy.otf in Resources */, 5565FF2A1FE275E5002934E9 /* SanFranciscoDisplay-Bold.otf in Resources */, @@ -3964,6 +3971,7 @@ D945F125213E1D5100A24824 /* SendMoneyReceiptViewInterface.swift in Sources */, 04BEF55E205948E8007713F9 /* RewardViewModel.swift in Sources */, D92B80262140C3CB00A25B26 /* MainService.swift in Sources */, + D9B414422161AE2800A53D9D /* DatePickerViewController.swift in Sources */, 0428DC682048FF91008355D7 /* WalletTransactionTableViewCell.swift in Sources */, 9F23DF512074A02B0025D6DF /* MyCollectionViewCell.swift in Sources */, A28D38F0202D49C90012EF6A /* TransactionSearchViewController.swift in Sources */, diff --git a/GMERemittance/.DS_Store b/GMERemittance/.DS_Store index 7167eed3..9a044f5e 100644 Binary files a/GMERemittance/.DS_Store and b/GMERemittance/.DS_Store differ diff --git a/GMERemittance/Assets.xcassets/.DS_Store b/GMERemittance/Assets.xcassets/.DS_Store new file mode 100644 index 00000000..57ada4ef Binary files /dev/null and b/GMERemittance/Assets.xcassets/.DS_Store differ diff --git a/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift b/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift index 290bc4d4..35848a5b 100644 --- a/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift +++ b/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift @@ -77,7 +77,7 @@ class SplashScreenViewController: UIViewController { // MARK: Other Functions private func hideNavBar() { - self.navigationController?.isNavigationBarHidden = false + self.navigationController?.isNavigationBarHidden = true self.navigationController?.navigationBar.barTintColor = UIColor.init(hex: "ED1C24") self.navigationController?.navigationBar.isTranslucent = false self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default) @@ -97,7 +97,7 @@ class SplashScreenViewController: UIViewController { view.addGestureRecognizer(leftSwipe) view.addGestureRecognizer(rightSwipe) - Timer.scheduledTimer(timeInterval: 2, target: self, selector: #selector(_SplashScreenViewController.updateImage), userInfo: nil, repeats: true) +// Timer.scheduledTimer(timeInterval: 2, target: self, selector: #selector(_SplashScreenViewController.updateImage), userInfo: nil, repeats: true) } @objc func handleSwipes(_ sender: UISwipeGestureRecognizer) { @@ -133,7 +133,6 @@ class SplashScreenViewController: UIViewController { switch counter { case 0: - imageViewDotLeft.image = imageDotSelected imageViewHomeLogo.image = imageFirst labelHomeDescription.text = descriptionFirst diff --git a/GMERemittance/Module/TransactionHistory/User Interface/View/DatePickerViewController.swift b/GMERemittance/Module/TransactionHistory/User Interface/View/DatePickerViewController.swift new file mode 100644 index 00000000..cdf964d7 --- /dev/null +++ b/GMERemittance/Module/TransactionHistory/User Interface/View/DatePickerViewController.swift @@ -0,0 +1,71 @@ +// +// DatePickerViewController.swift +// GMERemittance +// +// Created by gme_2 on 01/10/2018. +// Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved. +// + +import UIKit + +class DatePickerViewController: UIViewController { + @IBOutlet weak var fromTextfield: UITextField! + @IBOutlet weak var toTextfield: UITextField! + + var completion: ((_ from: Date?, _ to: Date?) -> ())? + + var fromDate: Date? + var toDate: Date? + + let fromDatePicker = UIDatePicker() + let toDatePicker = UIDatePicker() + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + // IBActions + @IBAction func cancel(_ sender: Any) { + self.dismiss(animated: true, completion: nil) + } + + @IBAction func searcg(_ sender: UIButton) { + self.dismiss(animated: true, completion: { + self.completion?(self.fromDate, self.toDate) + }) + } + + + + // private functions + private func setupFromDatePicker() { + self.fromDatePicker.datePickerMode = .date + self.fromTextfield.inputView = fromDatePicker + fromDatePicker.maximumDate = Date() + self.fromDatePicker.addTarget(self, action: #selector(handleFromDatePicker(sender:)), for: .valueChanged) + } + + @objc private func handleFromDatePicker(sender: UIDatePicker) { + self.fromDate = sender.date + let dateFormatter = DateFormatter() + dateFormatter.dateFormat = AppConstants.dateFormat + self.fromTextfield.text = dateFormatter.string(from: sender.date) + } + + private func setupToDatePicker() { + self.toDatePicker.datePickerMode = .date + self.toTextfield.inputView = toDatePicker + toDatePicker.maximumDate = Date() + self.toDatePicker.addTarget(self, action: #selector(handleToDatePicker(sender:)), for: .valueChanged) + } + + @objc private func handleToDatePicker(sender: UIDatePicker) { + self.toDate = sender.date + let dateFormatter = DateFormatter() + dateFormatter.dateFormat = AppConstants.dateFormat + self.toTextfield.text = dateFormatter.string(from: sender.date) + } +} diff --git a/GMERemittance/Module/TransactionHistory/User Interface/View/TransactionHistoryDatePicker.storyboard b/GMERemittance/Module/TransactionHistory/User Interface/View/TransactionHistoryDatePicker.storyboard new file mode 100644 index 00000000..eb940eef --- /dev/null +++ b/GMERemittance/Module/TransactionHistory/User Interface/View/TransactionHistoryDatePicker.storyboard @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + SanFranciscoText-Regular + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GMERemittance/Module/TransactionHistory/User Interface/View/TransactionHistoryViewController.swift b/GMERemittance/Module/TransactionHistory/User Interface/View/TransactionHistoryViewController.swift index d4e1ccdb..5d6fd9d0 100644 --- a/GMERemittance/Module/TransactionHistory/User Interface/View/TransactionHistoryViewController.swift +++ b/GMERemittance/Module/TransactionHistory/User Interface/View/TransactionHistoryViewController.swift @@ -71,6 +71,8 @@ class TransactionHistoryViewController: UIViewController { // MARK: IBActions @IBAction func openSearchFilter(_ sender: UIButton) { // open search filter + let viewController = UIStoryboard.init(name: "TransactionHistoryDatePicker", bundle: nil).instantiateViewController(withIdentifier: "DatePickerViewController") as! DatePickerViewController + self.present(viewController, animated: true, completion: nil) } @IBAction func segmentChanged(_ sender: UISegmentedControl) {