Browse Source

Merge branch 'addMain' into send-money-module

pull/1/head
gme_2 6 years ago
parent
commit
3d7bb0109a
  1. 112
      GMERemittance.xcodeproj/project.pbxproj
  2. 24
      GMERemittance/AppDelegate.swift
  3. 107
      GMERemittance/Base.lproj/Main.storyboard
  4. 55
      GMERemittance/Extension/UIViewControllerExtension.swift
  5. 6
      GMERemittance/FillKYC/KYCDocumentsUploadViewController.swift
  6. 4
      GMERemittance/Home/Home.storyboard
  7. 69
      GMERemittance/Home/HomeViewController.swift
  8. 8
      GMERemittance/Login/LoginViewController.swift
  9. BIN
      GMERemittance/Module/.DS_Store
  10. 27
      GMERemittance/Module/Main/Application Logic/Interactor/MainInteractor.swift
  11. 15
      GMERemittance/Module/Main/Application Logic/Interactor/MainInteractorIO.swift
  12. 18
      GMERemittance/Module/Main/Application Logic/Service/MainService.swift
  13. 13
      GMERemittance/Module/Main/Application Logic/Service/MainServiceType.swift
  14. 10
      GMERemittance/Module/Main/Module Interface/MainModuleInterface.swift
  15. 28
      GMERemittance/Module/Main/User Interface/Presenter/MainPresenter.swift
  16. 174
      GMERemittance/Module/Main/User Interface/View/MainViewController.swift
  17. 11
      GMERemittance/Module/Main/User Interface/View/MainViewInterface.swift
  18. 82
      GMERemittance/Module/Main/User Interface/Wireframe/MainWireframe.swift
  19. 13
      GMERemittance/Module/Main/User Interface/Wireframe/MainWireframeInput.swift
  20. 6
      GMERemittance/Module/SendMoneyParent/Application Logic/Interactor/SendMoneyParentInteractor.swift
  21. 1
      GMERemittance/Module/SendMoneyParent/User Interface/View/SendMoneyParent.storyboard
  22. 2
      GMERemittance/Module/SendMoneyParent/User Interface/Wireframe/SendMoneyParentWireframe.swift
  23. 4
      GMERemittance/Profile/Profile.storyboard
  24. 4
      GMERemittance/Recipient/RecipientListViewController.storyboard
  25. 23
      GMERemittance/SideMenu/SideMenuViewController.swift
  26. 6
      GMERemittance/Splash/SplashScreenViewController.swift

112
GMERemittance.xcodeproj/project.pbxproj

@ -300,6 +300,16 @@
D922D9B021351B7400D43053 /* SendMoneyVerification.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D922D9A521351B7400D43053 /* SendMoneyVerification.storyboard */; };
D922D9B121351B7400D43053 /* SendMoneyVerificationViewInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = D922D9A621351B7400D43053 /* SendMoneyVerificationViewInterface.swift */; };
D922D9B221351B7400D43053 /* SendMoneyVerificationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D922D9A721351B7400D43053 /* SendMoneyVerificationViewController.swift */; };
D92B80252140C3CB00A25B26 /* MainModuleInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = D92B80142140C3CB00A25B26 /* MainModuleInterface.swift */; };
D92B80262140C3CB00A25B26 /* MainService.swift in Sources */ = {isa = PBXBuildFile; fileRef = D92B80172140C3CB00A25B26 /* MainService.swift */; };
D92B80272140C3CB00A25B26 /* MainServiceType.swift in Sources */ = {isa = PBXBuildFile; fileRef = D92B80182140C3CB00A25B26 /* MainServiceType.swift */; };
D92B80282140C3CB00A25B26 /* MainInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = D92B801A2140C3CB00A25B26 /* MainInteractor.swift */; };
D92B80292140C3CB00A25B26 /* MainInteractorIO.swift in Sources */ = {isa = PBXBuildFile; fileRef = D92B801B2140C3CB00A25B26 /* MainInteractorIO.swift */; };
D92B802A2140C3CB00A25B26 /* MainPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = D92B801E2140C3CB00A25B26 /* MainPresenter.swift */; };
D92B802B2140C3CB00A25B26 /* MainWireframeInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = D92B80202140C3CB00A25B26 /* MainWireframeInput.swift */; };
D92B802C2140C3CB00A25B26 /* MainWireframe.swift in Sources */ = {isa = PBXBuildFile; fileRef = D92B80212140C3CB00A25B26 /* MainWireframe.swift */; };
D92B802D2140C3CB00A25B26 /* MainViewInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = D92B80232140C3CB00A25B26 /* MainViewInterface.swift */; };
D92B802E2140C3CB00A25B26 /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D92B80242140C3CB00A25B26 /* MainViewController.swift */; };
D945F11D213E1D5100A24824 /* SendMoneyReceiptModuleInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = D945F10A213E1D5100A24824 /* SendMoneyReceiptModuleInterface.swift */; };
D945F11E213E1D5100A24824 /* SendMoneyReceiptService.swift in Sources */ = {isa = PBXBuildFile; fileRef = D945F10D213E1D5100A24824 /* SendMoneyReceiptService.swift */; };
D945F11F213E1D5100A24824 /* SendMoneyReceiptServiceType.swift in Sources */ = {isa = PBXBuildFile; fileRef = D945F10E213E1D5100A24824 /* SendMoneyReceiptServiceType.swift */; };
@ -704,6 +714,16 @@
D922D9A521351B7400D43053 /* SendMoneyVerification.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = SendMoneyVerification.storyboard; sourceTree = "<group>"; };
D922D9A621351B7400D43053 /* SendMoneyVerificationViewInterface.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendMoneyVerificationViewInterface.swift; sourceTree = "<group>"; };
D922D9A721351B7400D43053 /* SendMoneyVerificationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendMoneyVerificationViewController.swift; sourceTree = "<group>"; };
D92B80142140C3CB00A25B26 /* MainModuleInterface.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainModuleInterface.swift; sourceTree = "<group>"; };
D92B80172140C3CB00A25B26 /* MainService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainService.swift; sourceTree = "<group>"; };
D92B80182140C3CB00A25B26 /* MainServiceType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainServiceType.swift; sourceTree = "<group>"; };
D92B801A2140C3CB00A25B26 /* MainInteractor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainInteractor.swift; sourceTree = "<group>"; };
D92B801B2140C3CB00A25B26 /* MainInteractorIO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainInteractorIO.swift; sourceTree = "<group>"; };
D92B801E2140C3CB00A25B26 /* MainPresenter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainPresenter.swift; sourceTree = "<group>"; };
D92B80202140C3CB00A25B26 /* MainWireframeInput.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainWireframeInput.swift; sourceTree = "<group>"; };
D92B80212140C3CB00A25B26 /* MainWireframe.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainWireframe.swift; sourceTree = "<group>"; };
D92B80232140C3CB00A25B26 /* MainViewInterface.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainViewInterface.swift; sourceTree = "<group>"; };
D92B80242140C3CB00A25B26 /* MainViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; };
D945F10A213E1D5100A24824 /* SendMoneyReceiptModuleInterface.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendMoneyReceiptModuleInterface.swift; sourceTree = "<group>"; };
D945F10D213E1D5100A24824 /* SendMoneyReceiptService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendMoneyReceiptService.swift; sourceTree = "<group>"; };
D945F10E213E1D5100A24824 /* SendMoneyReceiptServiceType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendMoneyReceiptServiceType.swift; sourceTree = "<group>"; };
@ -1307,6 +1327,7 @@
D907AB96212AA8A300915A87 /* Module */ = {
isa = PBXGroup;
children = (
D92B80122140C3CB00A25B26 /* Main */,
D945F108213E1D5100A24824 /* SendMoneyReceipt */,
D922D99321351B7400D43053 /* SendMoneyVerification */,
D922D96F21351AAE00D43053 /* SendMoneyExchangeRate */,
@ -1894,6 +1915,87 @@
path = ViewModels;
sourceTree = "<group>";
};
D92B80122140C3CB00A25B26 /* Main */ = {
isa = PBXGroup;
children = (
D92B80132140C3CB00A25B26 /* Module Interface */,
D92B80152140C3CB00A25B26 /* Application Logic */,
D92B801C2140C3CB00A25B26 /* User Interface */,
);
path = Main;
sourceTree = "<group>";
};
D92B80132140C3CB00A25B26 /* Module Interface */ = {
isa = PBXGroup;
children = (
D92B80142140C3CB00A25B26 /* MainModuleInterface.swift */,
);
path = "Module Interface";
sourceTree = "<group>";
};
D92B80152140C3CB00A25B26 /* Application Logic */ = {
isa = PBXGroup;
children = (
D92B80162140C3CB00A25B26 /* Service */,
D92B80192140C3CB00A25B26 /* Interactor */,
);
path = "Application Logic";
sourceTree = "<group>";
};
D92B80162140C3CB00A25B26 /* Service */ = {
isa = PBXGroup;
children = (
D92B80172140C3CB00A25B26 /* MainService.swift */,
D92B80182140C3CB00A25B26 /* MainServiceType.swift */,
);
path = Service;
sourceTree = "<group>";
};
D92B80192140C3CB00A25B26 /* Interactor */ = {
isa = PBXGroup;
children = (
D92B801A2140C3CB00A25B26 /* MainInteractor.swift */,
D92B801B2140C3CB00A25B26 /* MainInteractorIO.swift */,
);
path = Interactor;
sourceTree = "<group>";
};
D92B801C2140C3CB00A25B26 /* User Interface */ = {
isa = PBXGroup;
children = (
D92B801D2140C3CB00A25B26 /* Presenter */,
D92B801F2140C3CB00A25B26 /* Wireframe */,
D92B80222140C3CB00A25B26 /* View */,
);
path = "User Interface";
sourceTree = "<group>";
};
D92B801D2140C3CB00A25B26 /* Presenter */ = {
isa = PBXGroup;
children = (
D92B801E2140C3CB00A25B26 /* MainPresenter.swift */,
);
path = Presenter;
sourceTree = "<group>";
};
D92B801F2140C3CB00A25B26 /* Wireframe */ = {
isa = PBXGroup;
children = (
D92B80202140C3CB00A25B26 /* MainWireframeInput.swift */,
D92B80212140C3CB00A25B26 /* MainWireframe.swift */,
);
path = Wireframe;
sourceTree = "<group>";
};
D92B80222140C3CB00A25B26 /* View */ = {
isa = PBXGroup;
children = (
D92B80232140C3CB00A25B26 /* MainViewInterface.swift */,
D92B80242140C3CB00A25B26 /* MainViewController.swift */,
);
path = View;
sourceTree = "<group>";
};
D945F108213E1D5100A24824 /* SendMoneyReceipt */ = {
isa = PBXGroup;
children = (
@ -2749,6 +2851,7 @@
D962231B212BE4CA00B7A115 /* TablePickerWithImageTableViewCell.swift in Sources */,
D945F125213E1D5100A24824 /* SendMoneyReceiptViewInterface.swift in Sources */,
04BEF55E205948E8007713F9 /* RewardViewModel.swift in Sources */,
D92B80262140C3CB00A25B26 /* MainService.swift in Sources */,
0428DC682048FF91008355D7 /* WalletTransactionTableViewCell.swift in Sources */,
9F23DF512074A02B0025D6DF /* MyCollectionViewCell.swift in Sources */,
A28D38F0202D49C90012EF6A /* TransactionSearchViewController.swift in Sources */,
@ -2831,6 +2934,7 @@
D95B7043213F9A2C0053CC3D /* CALayerExtension.swift in Sources */,
A25CF60920467BA40029BC12 /* InviteViewController.swift in Sources */,
D922D9AD21351B7400D43053 /* SendMoneyVerificationPresenter.swift in Sources */,
D92B802D2140C3CB00A25B26 /* MainViewInterface.swift in Sources */,
A25A6C092029ADA80024CDFB /* TranscationStatementViewController.swift in Sources */,
D962231E212C126500B7A115 /* ExchangeModel.swift in Sources */,
A2637C5820395B8F006EA9AA /* NotificationTableViewCell.swift in Sources */,
@ -2854,6 +2958,7 @@
D922D9452135124200D43053 /* SendMoneyPaymentModePresenter.swift in Sources */,
9F3CFC582028272B0034F588 /* TrackRecipientViewModel.swift in Sources */,
D922D9662135145F00D43053 /* SendMoneyParentInteractorIO.swift in Sources */,
D92B802B2140C3CB00A25B26 /* MainWireframeInput.swift in Sources */,
9FA00FBE1FEE69AF0049753E /* UIViewExtension.swift in Sources */,
04C6F2422025CE0F0055B083 /* WalletViewController.swift in Sources */,
D9B7ADF12130048E009B0564 /* ExchangeRatesService.swift in Sources */,
@ -2873,6 +2978,7 @@
D922D98521351AAE00D43053 /* SendMoneyExchangeRateServiceType.swift in Sources */,
D922D91E2134DCF000D43053 /* EditReciepientService.swift in Sources */,
9F1F7A5C1FF2146000A4DD82 /* ReviewViewController.swift in Sources */,
D92B802C2140C3CB00A25B26 /* MainWireframe.swift in Sources */,
D922D9222134DCF000D43053 /* EditReciepientWireframeInput.swift in Sources */,
D9768C88213BAE92009E01BC /* User.swift in Sources */,
0430986E2029FBA300821C70 /* TextFieldExtension.swift in Sources */,
@ -2889,6 +2995,7 @@
04BEF55A20593CFB007713F9 /* RewardViewController.swift in Sources */,
A2661F32201EEC1C00ECBF94 /* ProfileViewModel.swift in Sources */,
9FD1EE6A1FF0F48F00AC79FC /* PaymentMethodViewController.swift in Sources */,
D92B80252140C3CB00A25B26 /* MainModuleInterface.swift in Sources */,
A255A907206A14220002905D /* SSBadgeButton.swift in Sources */,
D922D9232134DCF000D43053 /* EditReciepientWireframe.swift in Sources */,
D945F121213E1D5100A24824 /* SendMoneyReceiptInteractorIO.swift in Sources */,
@ -2912,6 +3019,7 @@
A2266A5D2028451700E890A6 /* AgentViewModel.swift in Sources */,
D922D9652135145F00D43053 /* SendMoneyParentInteractor.swift in Sources */,
04BED13A2015BC6300B4CEB7 /* CDDenum.swift in Sources */,
D92B80292140C3CB00A25B26 /* MainInteractorIO.swift in Sources */,
0496B84F1FE7DFCD0044810E /* StringExtension.swift in Sources */,
D9B7ADF52130048E009B0564 /* ExchangeRatesPresenter.swift in Sources */,
A2E3379720483C84002DB015 /* InviteViewModel.swift in Sources */,
@ -2985,6 +3093,7 @@
04CD5395208F0765008F0971 /* UploadImageViewModel.swift in Sources */,
D922D9AF21351B7400D43053 /* SendMoneyVerificationWireframeInput.swift in Sources */,
A2CB8E592027002E00008EEE /* ExchangeRateViewModel.swift in Sources */,
D92B80282140C3CB00A25B26 /* MainInteractor.swift in Sources */,
A2B9D7592020C616007C1049 /* MyStoryViewController.swift in Sources */,
D96848CC212D3F2300EF12B1 /* ExchangeRateApiService.swift in Sources */,
A2B0DD8E2085AC690074A5BA /* PaymentMethodId.swift in Sources */,
@ -2998,11 +3107,13 @@
D945F122213E1D5100A24824 /* SendMoneyReceiptPresenter.swift in Sources */,
04BEF55C20593F0C007713F9 /* RewardCollectionViewCell.swift in Sources */,
9F983C0A20245483001DCB3F /* SplashScreenViewController.swift in Sources */,
D92B802A2140C3CB00A25B26 /* MainPresenter.swift in Sources */,
D922D91D2134DCF000D43053 /* EditReciepientServiceType.swift in Sources */,
D90D55D121327CD600EEEE04 /* AddReciepientWireframe.swift in Sources */,
D957DC6C213D05E700FA812D /* SendMoneySubmitResponse.swift in Sources */,
D90D55CB21327CD600EEEE04 /* AddReciepientModuleInterface.swift in Sources */,
9F04F1D92088BE160011C0BA /* CurrenciesData.swift in Sources */,
D92B80272140C3CB00A25B26 /* MainServiceType.swift in Sources */,
D95B5E4B21315C57000C0B33 /* EmptyTableViewCell.swift in Sources */,
04CAEC2D1FEBAEB400C819D4 /* KYCViewModel.swift in Sources */,
9F03D22E1FECFC52002E132E /* RecipientTranscationViewController.swift in Sources */,
@ -3018,6 +3129,7 @@
A2637C5A20395BA7006EA9AA /* NotificationViewController.swift in Sources */,
048031B4209464400002B1A1 /* WalletLoadMoreTableViewCell.swift in Sources */,
9F40C3521FEAB0F4000CB53C /* KYCDocumentsUploadViewController.swift in Sources */,
D92B802E2140C3CB00A25B26 /* MainViewController.swift in Sources */,
D9CB49872132A5F500B7A124 /* ItemsPickerViewController.swift in Sources */,
D922D9422135124200D43053 /* SendMoneyPaymentModeServiceType.swift in Sources */,
9F2B5AF020218751002284F6 /* ProfileDocumentViewController.swift in Sources */,

24
GMERemittance/AppDelegate.swift

@ -239,7 +239,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
let nav = UINavigationController()
if (UserDefaults.standard.object(forKey: "com.gmeremit.loginStatus") as! Bool) {
// login cha
guard (UserDefaults.standard.object(forKey: UserKeys.kyc) as? Bool) ?? false == true else {
let storyboard = UIStoryboard.init(name: "Main", bundle: Bundle.main)
if let KYCPersonalInfoViewController = storyboard.instantiateViewController(withIdentifier: "KYCPersonalInfoViewController") as? KYCPersonalInfoViewController {
@ -251,22 +251,26 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
return
}
let storyboard = UIStoryboard.init(name: "Main", bundle: Bundle.main)
if let tabViewController = storyboard.instantiateViewController(withIdentifier: "TabBarController") as? UITabBarController {
nav.viewControllers = [tabViewController]
window?.rootViewController = nav
}
let mainWireFrame = MainWireframe.shared
let tabbarViewController = mainWireFrame?.getMainView()
window?.rootViewController = tabbarViewController
window?.makeKeyAndVisible()
// let storyboard = UIStoryboard.init(name: "Main", bundle: Bundle.main)
// if let tabViewController = storyboard.instantiateViewController(withIdentifier: "TabBarController") as? UITabBarController {
//
// nav.viewControllers = [tabViewController]
//
// window?.rootViewController = nav
// }
} else {
let storyboard = UIStoryboard.init(name: "Main", bundle: Bundle.main)
if let splashScreenViewController = storyboard.instantiateViewController(withIdentifier: "SplashScreenViewController") as? SplashScreenViewController {
nav.viewControllers = [splashScreenViewController]
// nav.viewControllers = [splashScreenViewController]
window?.rootViewController = nav
window?.rootViewController = splashScreenViewController
}
}
}

107
GMERemittance/Base.lproj/Main.storyboard

@ -39,26 +39,26 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="603"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="splash_logo" translatesAutoresizingMaskIntoConstraints="NO" id="kok-4B-wZk">
<rect key="frame" x="105" y="18.5" width="165" height="47"/>
<rect key="frame" x="105" y="30" width="165" height="47"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_ovalBackground" translatesAutoresizingMaskIntoConstraints="NO" id="rl9-fV-exP">
<rect key="frame" x="112.5" y="137" width="150" height="150"/>
<rect key="frame" x="112.5" y="77" width="150" height="150"/>
<constraints>
<constraint firstAttribute="width" constant="150" id="QpQ-Ls-Vc5"/>
<constraint firstAttribute="height" constant="150" id="dlr-f4-sM1"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Hassle free money transfer to your loved ones" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PRr-8o-QvN">
<rect key="frame" x="34" y="323" width="308" height="43"/>
<rect key="frame" x="34" y="263" width="308" height="43"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Semibold" family="San Francisco Display" pointSize="18"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_splashFirstScreen" translatesAutoresizingMaskIntoConstraints="NO" id="QrR-tP-oPJ">
<rect key="frame" x="162.5" y="187" width="50" height="50"/>
<rect key="frame" x="162.5" y="127" width="50" height="50"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fVu-CT-UjF">
<rect key="frame" x="88" y="534" width="200" height="50"/>
<rect key="frame" x="88" y="474" width="200" height="50"/>
<color key="backgroundColor" red="0.81568627450980391" green="0.0078431372549019607" blue="0.10588235294117647" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="S2I-i8-aRa"/>
@ -70,7 +70,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="x8u-cs-6O3">
<rect key="frame" x="88" y="470" width="200" height="50"/>
<rect key="frame" x="88" y="410" width="200" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="gma-62-erH"/>
</constraints>
@ -92,13 +92,13 @@
</connections>
</button>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="dotUnselected" translatesAutoresizingMaskIntoConstraints="NO" id="bOs-5T-AWQ" userLabel="dotCenter">
<rect key="frame" x="184.5" y="421" width="7" height="7"/>
<rect key="frame" x="184.5" y="361" width="7" height="7"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="dotUnselected" translatesAutoresizingMaskIntoConstraints="NO" id="X2I-Gg-zA9" userLabel="dotLeft">
<rect key="frame" x="168.5" y="421" width="7" height="7"/>
<rect key="frame" x="168.5" y="361" width="7" height="7"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="dotUnselected" translatesAutoresizingMaskIntoConstraints="NO" id="9tc-ft-OVW" userLabel="dotRight">
<rect key="frame" x="200.5" y="421" width="7" height="7"/>
<rect key="frame" x="200.5" y="361" width="7" height="7"/>
</imageView>
</subviews>
<color key="backgroundColor" red="0.92941176470588238" green="0.10980392156862745" blue="0.14117647058823529" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -119,14 +119,14 @@
<constraint firstAttribute="trailing" secondItem="x8u-cs-6O3" secondAttribute="trailing" constant="87" id="cHO-Xt-AVw"/>
<constraint firstAttribute="trailing" secondItem="PRr-8o-QvN" secondAttribute="trailing" constant="33" id="cPZ-Ap-9Tf"/>
<constraint firstAttribute="trailing" secondItem="kok-4B-wZk" secondAttribute="trailing" constant="105" id="dG7-KD-4nm"/>
<constraint firstItem="kok-4B-wZk" firstAttribute="top" secondItem="xvT-RY-VmM" secondAttribute="top" constant="18.5" id="fV8-BQ-GnV"/>
<constraint firstItem="kok-4B-wZk" firstAttribute="top" secondItem="xvT-RY-VmM" secondAttribute="top" constant="30" id="fV8-BQ-GnV"/>
<constraint firstItem="QrR-tP-oPJ" firstAttribute="top" secondItem="rl9-fV-exP" secondAttribute="top" constant="50" id="hnl-Rk-e5x"/>
<constraint firstItem="kok-4B-wZk" firstAttribute="leading" secondItem="xvT-RY-VmM" secondAttribute="leading" constant="105" id="ihL-6i-3M9"/>
<constraint firstItem="bOs-5T-AWQ" firstAttribute="centerX" secondItem="xvT-RY-VmM" secondAttribute="centerX" id="mYa-5W-f8c"/>
<constraint firstItem="PRr-8o-QvN" firstAttribute="top" secondItem="rl9-fV-exP" secondAttribute="bottom" constant="36" id="nbB-fL-CBC"/>
<constraint firstItem="fVu-CT-UjF" firstAttribute="top" secondItem="x8u-cs-6O3" secondAttribute="bottom" constant="14" id="nqA-oq-top"/>
<constraint firstItem="fVu-CT-UjF" firstAttribute="leading" secondItem="xvT-RY-VmM" secondAttribute="leading" constant="88" id="pqN-BP-xHc"/>
<constraint firstItem="rl9-fV-exP" firstAttribute="top" secondItem="kok-4B-wZk" secondAttribute="bottom" constant="71.200000000000003" id="w9D-dL-ckG"/>
<constraint firstItem="rl9-fV-exP" firstAttribute="top" secondItem="kok-4B-wZk" secondAttribute="bottom" id="w9D-dL-ckG"/>
<constraint firstItem="PRr-8o-QvN" firstAttribute="leading" secondItem="xvT-RY-VmM" secondAttribute="leading" constant="34" id="weA-VT-9J8"/>
<constraint firstItem="rl9-fV-exP" firstAttribute="bottom" secondItem="QrR-tP-oPJ" secondAttribute="bottom" constant="50" id="xrS-Rd-EE0"/>
</constraints>
@ -134,12 +134,13 @@
</subviews>
<constraints>
<constraint firstItem="xvT-RY-VmM" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" id="9fT-XC-k8S"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="bottom" secondItem="xvT-RY-VmM" secondAttribute="bottom" id="Adc-ek-52e"/>
<constraint firstItem="xvT-RY-VmM" firstAttribute="top" secondItem="6Tk-OE-BBY" secondAttribute="top" id="I03-aH-3CM"/>
<constraint firstAttribute="bottom" secondItem="xvT-RY-VmM" secondAttribute="bottom" id="kjM-m0-Y6t"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="xvT-RY-VmM" secondAttribute="trailing" id="rdP-te-g8q"/>
<constraint firstItem="xvT-RY-VmM" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" id="x2W-vy-ijG"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
<extendedEdge key="edgesForExtendedLayout"/>
<navigationItem key="navigationItem" id="g03-fP-Gmk"/>
<connections>
<outlet property="buttonLogin" destination="x8u-cs-6O3" id="Mxs-G3-2Q8"/>
@ -151,7 +152,6 @@
<outlet property="imageViewDotRight" destination="9tc-ft-OVW" id="etb-ah-gOT"/>
<outlet property="imageViewHomeLogo" destination="QrR-tP-oPJ" id="Q8L-C2-CrE"/>
<outlet property="labelHomeDescription" destination="PRr-8o-QvN" id="tyt-sT-0hL"/>
<segue destination="0az-Ng-7pO" kind="show" identifier="autoLogin" id="uMM-0h-PWi"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
@ -372,7 +372,6 @@
<outlet property="textFieldUsername" destination="qi4-wl-qgo" id="PX6-r5-u9K"/>
<outlet property="viewContent" destination="g8V-YZ-QVm" id="xZ2-NN-hRd"/>
<segue destination="Vg2-bx-rTL" kind="show" identifier="fillKYCPersonalInfo" id="TLU-QI-5gP"/>
<segue destination="0az-Ng-7pO" kind="show" identifier="homeFromLogin" id="pwB-VD-fz9"/>
<segue destination="JVb-jN-Xur" kind="show" identifier="redirectToOTP" id="svy-hP-XC8"/>
<segue destination="yBQ-gl-dse" kind="show" identifier="forgetPasswordIdentifier" id="rHO-T1-AD7"/>
</connections>
@ -2665,7 +2664,6 @@
<outlet property="kycSecondStep" destination="xon-PJ-Evn" id="lAo-hc-Kke"/>
<outlet property="viewOutlet" destination="L6a-xP-erH" id="6cU-ED-1XT"/>
<outlet property="viewProgressBarOutlet" destination="0nF-43-xhn" id="DJL-Ux-6AV"/>
<segue destination="0az-Ng-7pO" kind="show" identifier="homeScreen" id="yZJ-mF-FB7"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="VJg-18-JeJ" userLabel="First Responder" sceneMemberID="firstResponder"/>
@ -2812,6 +2810,7 @@
<!--Navigation Controller-->
<scene sceneID="raP-L9-9VT">
<objects>
<placeholder placeholderIdentifier="IBFirstResponder" id="Obb-md-3OC" userLabel="First Responder" sceneMemberID="firstResponder"/>
<navigationController storyboardIdentifier="MyNavigation" automaticallyAdjustsScrollViewInsets="NO" id="YOf-Fd-kYt" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" barStyle="black" translucent="NO" id="Tn5-1b-xua">
@ -2826,62 +2825,9 @@
<segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="p30-3y-QOq"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Obb-md-3OC" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-1041" y="63"/>
</scene>
<!--Tab Bar View Controller-->
<scene sceneID="hsH-1G-4f2">
<objects>
<tabBarController storyboardIdentifier="TabBarController" automaticallyAdjustsScrollViewInsets="NO" id="0az-Ng-7pO" customClass="TabBarViewController" customModule="GMERemittance" customModuleProvider="target" sceneMemberID="viewController">
<toolbarItems/>
<tabBar key="tabBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="1qX-CL-oox">
<rect key="frame" x="0.0" y="0.0" width="1000" height="1000"/>
<autoresizingMask key="autoresizingMask"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="selectedImageTintColor" red="0.92941176470588238" green="0.10980392156862745" blue="0.14117647058823529" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</tabBar>
<connections>
<segue destination="5If-HB-nF9" kind="relationship" relationship="viewControllers" id="akz-q7-zbx"/>
<segue destination="mPx-rX-glm" kind="relationship" relationship="viewControllers" id="PnV-hv-xR7"/>
<segue destination="YMA-bz-0X2" kind="relationship" relationship="viewControllers" id="9Jz-5E-Ydv"/>
<segue destination="4BF-jK-v1V" kind="relationship" relationship="viewControllers" id="H7M-CF-kRm"/>
</connections>
</tabBarController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Rba-j7-ORZ" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2887" y="2715"/>
</scene>
<!--RecipientListViewController-->
<scene sceneID="Gen-54-DUy">
<objects>
<viewControllerPlaceholder storyboardIdentifier="RecipientListViewController" storyboardName="RecipientListViewController" referencedIdentifier="RecipientListViewController" id="mPx-rX-glm" sceneMemberID="viewController">
<tabBarItem key="tabBarItem" title="Item" id="fMd-N9-Jji"/>
</viewControllerPlaceholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="vLu-48-Hp8" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2974" y="3296"/>
</scene>
<!--Profile-->
<scene sceneID="r9M-2F-bv9">
<objects>
<viewControllerPlaceholder storyboardName="Profile" id="4BF-jK-v1V" sceneMemberID="viewController">
<tabBarItem key="tabBarItem" title="Item" id="bIO-K3-OCG"/>
</viewControllerPlaceholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="t0G-06-FJs" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="4051" y="2547"/>
</scene>
<!--Home-->
<scene sceneID="OHH-Ot-Ctq">
<objects>
<viewControllerPlaceholder storyboardIdentifier="Home" storyboardName="Home" referencedIdentifier="Home" id="5If-HB-nF9" sceneMemberID="viewController">
<tabBarItem key="tabBarItem" title="Item" id="p0P-z9-iH2"/>
</viewControllerPlaceholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="Qyt-i0-7Mf" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="3670" y="2261"/>
</scene>
<!--Send Money-->
<scene sceneID="w8q-HR-jYC">
<objects>
@ -2898,16 +2844,6 @@
</objects>
<point key="canvasLocation" x="4006" y="3169"/>
</scene>
<!--GmeContacts-->
<scene sceneID="8LY-3i-UGj">
<objects>
<viewControllerPlaceholder storyboardName="GmeContacts" id="YMA-bz-0X2" sceneMemberID="viewController">
<tabBarItem key="tabBarItem" title="Item" id="0wO-Gn-FCi"/>
</viewControllerPlaceholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="hfp-af-GR7" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="3901" y="2773"/>
</scene>
<!--Pop Up General Info-->
<scene sceneID="UGU-RI-tiH">
<objects>
@ -3560,16 +3496,6 @@
</objects>
<point key="canvasLocation" x="-67" y="952"/>
</scene>
<!--Invite-->
<scene sceneID="Ssc-HM-Wlw">
<objects>
<viewControllerPlaceholder storyboardName="Invite" id="rI7-0f-E4B" sceneMemberID="viewController">
<tabBarItem key="tabBarItem" title="Item" id="Ywo-jJ-hTt"/>
</viewControllerPlaceholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="5La-sj-FGv" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="3726" y="2487"/>
</scene>
</scenes>
<resources>
<image name="dotUnselected" width="7" height="7"/>
@ -3585,8 +3511,7 @@
</resources>
<inferredMetricsTieBreakers>
<segue reference="JAI-Ow-0Xw"/>
<segue reference="uMM-0h-PWi"/>
<segue reference="svy-hP-XC8"/>
<segue reference="RzV-Tj-vdq"/>
<segue reference="7yw-xl-KSz"/>
</inferredMetricsTieBreakers>
</document>

55
GMERemittance/Extension/UIViewControllerExtension.swift

@ -663,50 +663,21 @@ extension UIViewController {
}
func setUpAnotherLoginListener(genericviewmodel: ModelExtension) {
genericviewmodel.anotherLogin.bind { [weak self] in
// genericviewmodel.anotherLogin.bind { [weak self] in
guard let context = self else {
return
}
guard $0 != nil else {
return
// guard let context = self else {
// return
// }
// guard $0 != nil else {
// return
// }
// if $0! {
// context.view.endEditing(true)
// context.enableUserInteractions()
// context.logOutUser()
// }
// }
}
if $0! {
context.view.endEditing(true)
context.enableUserInteractions()
context.logOutUser()
}
}
}
func logOutUser() {
UserDefaults.standard.removePersistentDomain(forName: Bundle.main.bundleIdentifier!)
UserDefaults.standard.synchronize()
let appDelegate = UIApplication.shared.delegate as! AppDelegate
appDelegate.firstTranscationStatusForHome = true
appDelegate.firstTranscationStatusForProfileForm = true
UserDefaults.standard.set(false, forKey: "com.gmeremit.loginStatus")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.dpUrl")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.walletNumber")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.bankName")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.fullName")
// UserDefaults.standard.removeObject(forKey: "com.gmeremit.accessCode")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.username")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.nickName")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.balance")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.rewardPoint")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.isVerified")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.isKYCSubmitted")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.email")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.mobileNumber")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.password")
UserDefaults.standard.removeObject(forKey: " com.gmeremit.isReferred")
let storyboard = UIStoryboard.init(name: "Main", bundle: Bundle.main)
let vController = storyboard.instantiateViewController(withIdentifier: "SplashScreenViewController") as! SplashScreenViewController
self.navigationController?.navigationBar.isHidden = false
self.navigationController!.pushViewController(vController, animated: false)
}
}

6
GMERemittance/FillKYC/KYCDocumentsUploadViewController.swift

@ -109,7 +109,11 @@ class KYCDocumentsUploadViewController: UIViewController {
UserDefaults.standard.set(true, forKey: "com.gmeremit.isKYCSubmitted")
UserDefaults.standard.set(true, forKey: "com.gmeremit.showImageAlert")
self.performSegue(withIdentifier: "homeScreen", sender: nil)
let mainWireFram = MainWireframe.shared
let window = UIApplication.shared.keyWindow
window?.rootViewController = mainWireFram?.getMainView()
window?.makeKeyAndVisible()
// self.performSegue(withIdentifier: "homeScreen", sender: nil)
}
}

4
GMERemittance/Home/Home.storyboard

@ -1111,10 +1111,10 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8WZ-lQ-Im6" userLabel="LoadMoreView">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7wo-T4-XhL">
<rect key="frame" x="155.5" y="8" width="63" height="29"/>
<rect key="frame" x="155.5" y="7.5" width="63" height="29"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<state key="normal" title="Load More"/>
<connections>

69
GMERemittance/Home/HomeViewController.swift

@ -108,22 +108,16 @@ class HomeViewController: UIViewController, TableViewCellDelegate, FBSDKSharing
// setUpAnotherLoginListener(genericviewmodel: socialfeedviewmodel)
setUpAnotherLoginListener(genericviewmodel: profileViewModel)
setUpNetworkListener()
// setUpNetworkListener()
super.viewWillAppear(true)
self.tabBarController?.tabBar.isHidden = false
setNavBar()
setActionBarIcons(showNotificationParameter: false)
// setUpRefreshControl()
bindUserStatusToUI()
profileViewModel.fetchUserInfo(userId: nil)
// socialfeedviewmodel.socialFeedsRxValue.value = nil
//
// socialfeedviewmodel.setAccessType(accessType: "public")
// self.bindFeedsDataToUI()
tableView.reloadSections(NSIndexSet(index: 3) as IndexSet, with: .none)
@ -152,33 +146,22 @@ class HomeViewController: UIViewController, TableViewCellDelegate, FBSDKSharing
@objc func refresh(_ sender: AnyObject) {
newFeedsWillBeAppended = false
// tableView.cellForRow(at: IndexPath(row: 0, section: 4))?.isHidden = true
// socialfeedviewmodel.resetBeforeAfterFeedId()
// socialfeedviewmodel.fetchSocialFeeds(isPublic: true, loadMore: false)
}
//--ALL NAV BAR FUNCTIONS HERE
func setNavBar() {
self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
self.navigationController?.navigationBar.shadowImage = UIImage()
self.navigationController?.navigationBar.isTranslucent = false
self.tabBarController?.navigationItem.hidesBackButton = true
let rightButton = UIBarButtonItem(image: UIImage(named: "ic_hamburger"), style: .plain, target: self, action: #selector(showSideMenu))
self.tabBarController?.navigationItem.leftBarButtonItem = rightButton
self.tabBarController?.navigationItem.leftBarButtonItem?.tintColor = UIColor.white
self.tabBarController?.navigationController?.navigationBar.barTintColor = UIColor(hex:0xec1c24)
self.navigationItem.leftBarButtonItem = rightButton
self.navigationItem.leftBarButtonItem?.tintColor = UIColor.white
self.navigationController?.navigationBar.barTintColor = UIColor(hex:0xec1c24)
let imageView = UIImageView(frame: CGRect(x: 0, y: 0, width: 125, height: 30))
imageView.contentMode = .scaleAspectFit
let image = UIImage(named: "ic_gme_new")
imageView.image = image
self.tabBarController?.navigationItem.titleView = imageView
self.navigationItem.titleView = imageView
}
@objc func showSideMenu() {
@ -273,6 +256,7 @@ class HomeViewController: UIViewController, TableViewCellDelegate, FBSDKSharing
@developer : Suraj Shrestha
@date : 2018/02/12
@des : Add action bar icons i.e notification and support
code refractored by ccr, almost maney many good things added. all bad things are left by previous dev :D
*/
func setActionBarIcons(showNotificationParameter: Bool){
let supportImage = UIImage(named: "ic_support")?.withRenderingMode(.alwaysOriginal)
@ -284,7 +268,7 @@ class HomeViewController: UIViewController, TableViewCellDelegate, FBSDKSharing
notificationImage = UIImage(named: "ic_notification")?.withRenderingMode(.alwaysOriginal)
}
let notificationButton = UIBarButtonItem(image: notificationImage, style: .plain, target: self, action: #selector(showNotification))
self.tabBarController?.navigationItem.rightBarButtonItems=[notificationButton,supportButton]
self.navigationItem.rightBarButtonItems=[notificationButton,supportButton]
}
/**
@ -344,25 +328,6 @@ class HomeViewController: UIViewController, TableViewCellDelegate, FBSDKSharing
performSegue(withIdentifier: "notification", sender: nil)
}
// func checkNetwork() {
// if !Reachability.isConnectedToNetwork() {
// self.popUpMessage(value: 15)
// }
// }
func setUpNetworkListener() {
// socialfeedviewmodel.internetConnection.value = nil
// socialfeedviewmodel.internetConnection.bind { [unowned self] in
// guard $0 != nil else {
// return
// }
// self.enableUserInteractions()
// self.popUpMessage(value: 15)
// }
}
override func viewDidLoad() {
super.viewDidLoad()
setupDelegates()
@ -1064,11 +1029,6 @@ extension HomeViewController: UITableViewDelegate, UITableViewDataSource {
switch index {
case .balance:
return 100
// if (UserDefaults.standard.object(forKey: "com.gmeremit.isVerified") as! Bool) {
// return 136
// } else {
// return 100
// }
case .collection:
let widthCell = ((view.frame.width - (insetForCollectionView * 3) ) - 10) / 2
@ -1135,17 +1095,10 @@ extension HomeViewController: UITableViewDelegate, UITableViewDataSource {
cell = tableView.dequeueReusableCell(withIdentifier: "topCell", for: indexPath) as! TableViewCell
if isVerifiedUser() {
// cell.viewVerify.alpha = 0
cell.viewTop.alpha = 1
//
// cell.btnLoadBalance.addTarget(self, action:#selector(loadBalanceTap(_:)), for:.touchUpInside)
cell.btnRewardPoint.setTitle(UserDefaults.standard.object(forKey: "com.gmeremit.rewardPoint") as? String, for: .normal)
cell.btnRewardPoint.addTarget(self, action:#selector(rewardTap(_:)), for:.touchUpInside)
setAvailableBalanceInStringAttributeFormat(label: cell.labelAvailableBalance)
let nickName = UserDefaults.standard.object(forKey: "com.gmeremit.nickName") as? String
if nickName == nil || nickName == "" {
let nameArray = (UserDefaults.standard.object(forKey: "com.gmeremit.fullName") as! String).split(separator: " ")
@ -1158,9 +1111,6 @@ extension HomeViewController: UITableViewDelegate, UITableViewDataSource {
} else {
// cell.viewTop.alpha = 0
// cell.viewVerify.alpha = 1
// todo: keep in view did load for first time dashboard entry.
self.alert(message: "Your document is in verification process. Thereafter you can enjoy GME online service. Thank you for registering with us!.")
cell.btnAgnet.addTarget(self, action:#selector(agentTap(_:)), for:.touchUpInside)
}
@ -1414,11 +1364,6 @@ extension HomeViewController: UICollectionViewDelegate, UICollectionViewDataSour
case 5:
self.alert(message: "This feature is comming soon")
return
// if (UserDefaults.standard.object(forKey: "com.gmeremit.isVerified") as! Bool) {
// self.performSegue(withIdentifier: "walletTransfer", sender: nil)
// } else {
// self.popUpMessage(value: 13)
// }
case 6:
showAllCollectionViewCells = true

8
GMERemittance/Login/LoginViewController.swift

@ -166,7 +166,13 @@ class LoginViewController: UIViewController {
}
func redirectToHomeViewController() {
self.performSegue(withIdentifier: "homeFromLogin", sender: nil)
// self.performSegue(withIdentifier: "homeFromLogin", sender: nil)
let wireFrame = MainWireframe.shared
let tabBarViewController = wireFrame?.getMainView()
if let delegate = UIApplication.shared.delegate as? AppDelegate {
delegate.window?.rootViewController = tabBarViewController
delegate.window?.makeKeyAndVisible()
}
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {

BIN
GMERemittance/Module/.DS_Store

27
GMERemittance/Module/Main/Application Logic/Interactor/MainInteractor.swift

@ -0,0 +1,27 @@
//
// MainInteractor.swift
// Sipradi
//
// Created by bibek timalsina on 5/26/17.
// Copyright © 2017 Ekbana. All rights reserved.
//
import Foundation
class MainInteractor: MainInteractorInput {
// MARK: Properties
weak var output: MainInteractorOutput?
private let service: MainServiceType
// MARK: Initialization
init(service: MainServiceType) {
self.service = service
}
// MARK: Main interactor input interface
// MARK: Converting entities
}

15
GMERemittance/Module/Main/Application Logic/Interactor/MainInteractorIO.swift

@ -0,0 +1,15 @@
//
// MainInteractorIO.swift
// Sipradi
//
// Created by bibek timalsina on 5/26/17.
// Copyright © 2017 Ekbana. All rights reserved.
//
protocol MainInteractorInput: class {
}
protocol MainInteractorOutput: class {
}

18
GMERemittance/Module/Main/Application Logic/Service/MainService.swift

@ -0,0 +1,18 @@
//
// MainService.swift
// Sipradi
//
// Created by bibek timalsina on 5/26/17.
// Copyright © 2017 Ekbana. All rights reserved.
//
import Foundation
class MainService: MainServiceType {
// MARK: Properties
// MARK: Initialization
// MARK: Data management
}

13
GMERemittance/Module/Main/Application Logic/Service/MainServiceType.swift

@ -0,0 +1,13 @@
//
// MainServiceType.swift
// Sipradi
//
// Created by bibek timalsina on 5/26/17.
// Copyright © 2017 Ekbana. All rights reserved.
//
import Foundation
protocol MainServiceType: class {
}

10
GMERemittance/Module/Main/Module Interface/MainModuleInterface.swift

@ -0,0 +1,10 @@
//
// MainModuleInterface.swift
// Sipradi
//
// Created by bibek timalsina on 5/26/17.
// Copyright © 2017 Ekbana. All rights reserved.
//
protocol MainModuleInterface: class {
}

28
GMERemittance/Module/Main/User Interface/Presenter/MainPresenter.swift

@ -0,0 +1,28 @@
//
// MainPresenter.swift
// Sipradi
//
// Created by bibek timalsina on 5/26/17.
// Copyright © 2017 Ekbana. All rights reserved.
//
import Foundation
class MainPresenter: MainInteractorOutput {
// MARK: Properties
weak var view: MainViewInterface?
var interactor: MainInteractorInput?
var wireframe: MainWireframeInput?
// MARK: Main module interface
// MARK: Main interactor output interface
// MARK: Converting entities
}
extension MainPresenter: MainModuleInterface {
}

174
GMERemittance/Module/Main/User Interface/View/MainViewController.swift

@ -0,0 +1,174 @@
//
// MainViewController.swift
// Sipradi
//
// Created by bibek timalsina on 5/26/17.
// Copyright © 2017 Ekbana. All rights reserved.
//
import Foundation
import UIKit
class MainViewController: UITabBarController {
// MARK: Properties
// MARK: ENUMS:
private enum Items: Int {
case home = 0
case sendMoney
case branch
case profile
}
var presenter: MainModuleInterface?
// MARK: VC's Life cycle
override func viewDidLoad() {
super.viewDidLoad()
self.setupAppearance()
}
func setup(viewControllers: [UIViewController]) {
self.viewControllers = viewControllers
self.setupTab()
setupTabItem()
}
// MARK: Other functions
func setupAppearance() {
UINavigationBar.setInsideAppearance()
}
private func setupTab() {
// self.tabBar.barTintColor = Colors.TabBar.barTint
self.tabBar.tintColor = Colors.defaultRed
self.tabBar.isTranslucent = false
self.tabBar.shadowImage = Colors.TabBar.shadow.image()
self.tabBar.backgroundImage = UIImage()
}
override func setupTabItem() {
self.viewControllers?.forEach({ (viewController) in
viewController.tabBarItem.imageInsets = UIEdgeInsets(top: 7, left: 0, bottom: -7, right: 0)
})
}
}
extension MainViewController: MainViewInterface {
}
//0xec1c24
extension UINavigationBar {
static func setInsideAppearance() {
let navBarAppearance = UINavigationBar.appearance()
navBarAppearance.isTranslucent = false
navBarAppearance.barTintColor = UIColor.white
// navBarAppearance.shadowImage = UIImage() //Colors.NavBar.shadow.image()
// let font = Fonts.NavBar.titleFont
//
// navBarAppearance.titleTextAttributes = [
// NSAttributedStringKey.foregroundColor: Colors.NavBar.tint,
// NSAttributedStringKey.font: font]
// navBarAppearance.tintColor = Colors.NavBar.tint
}
static func setOutsideAppearance() {
self.setInsideAppearance()
let navBarAppearance = UINavigationBar.appearance()
navBarAppearance.barTintColor = Colors.defaultRed
let font = Fonts.NavBar.titleFont
navBarAppearance.titleTextAttributes = [
NSAttributedStringKey.foregroundColor: UIColor.black,
NSAttributedStringKey.font: font]
navBarAppearance.tintColor = UIColor.black
}
static func setupImageAppearance() {
// self.setInsideAppearance()
let navBarAppearance = UINavigationBar.appearance()
navBarAppearance.barTintColor = Colors.defaultRed
let font = Fonts.NavBar.titleFont
navBarAppearance.titleTextAttributes = [
NSAttributedStringKey.foregroundColor: UIColor.black,
NSAttributedStringKey.font: font]
navBarAppearance.tintColor = UIColor.black
}
}
@objc protocol Setup {
@objc optional func setupTabItem()
}
extension UIViewController: Setup {
func setupTabItem() {
}
}
struct Colors {
static let separator = UIColor(hex: "#eeeeee")
static let defaultRed = UIColor(hex: "#0xec1c24")
static let cartBadge = UIColor(hex: "#F5951D")
struct TabBar {
static let textItemSelected = Colors.defaultRed
static let textItemNotSelected = UIColor(hex: "#959595")
static let shadow = Colors.separator
}
struct NavBar {
// static let barTint =
static let tint = UIColor.white
static let shadow = Colors.separator
}
struct XLTabBar {
static let titleUnselected = UIColor(hex: "#555555")
static let titleSelected = Colors.defaultRed
static let selectedBackground = Colors.defaultRed
}
}
struct Fonts {
private struct Family {
static let regular = "SanFranciscoDisplay-regular"
static let light = "SanFranciscoDisplay-light"
static let bold = "SanFranciscoDisplay-Bold"
}
struct TabBar {
static let itemFont = UIFont(name: Family.light, size: 10)!
}
struct NavBar {
static let titleFont = UIFont(name: Family.regular, size: 17)!
}
struct XLTabBar {
static let itemFont = UIFont(name: Family.light, size: 12)!
}
}
extension UIColor {
func image(of size: CGSize = CGSize(width: 1, height: 1)) -> UIImage {
let rect = CGRect(origin: .zero, size: size)
UIGraphicsBeginImageContextWithOptions(size, false, 0)
self.setFill()
UIRectFill(rect)
let image: UIImage = UIGraphicsGetImageFromCurrentImageContext()!
UIGraphicsEndImageContext()
return image
}
}

11
GMERemittance/Module/Main/User Interface/View/MainViewInterface.swift

@ -0,0 +1,11 @@
//
// MainViewInterface.swift
// Sipradi
//
// Created by bibek timalsina on 5/26/17.
// Copyright © 2017 Ekbana. All rights reserved.
//
protocol MainViewInterface: class {
}

82
GMERemittance/Module/Main/User Interface/Wireframe/MainWireframe.swift

@ -0,0 +1,82 @@
//
// MainWireframe.swift
// Sipradi
//
// Created by bibek timalsina on 5/26/17.
// Copyright © 2017 Ekbana. All rights reserved.
//
import Foundation
import UIKit
class MainWireframe {
static var shared: MainWireframe? = MainWireframe()
weak var view: UIViewController!
}
extension MainWireframe: MainWireframeInput {
var storyboardName: String {return "Main"}
func getMainView() -> UIViewController {
let viewController = MainViewController()
let viewControllers: [UIViewController] = self.getViewControllers()
viewController.setup(viewControllers: viewControllers)
viewController.setupTabItem()
self.view = viewController
self.show(index: 0) // temporary
return viewController
}
private func getViewControllers() -> [UIViewController] {
// home view controller
let homeViewController = UIStoryboard.init(name: "Home", bundle: nil).instantiateViewController(withIdentifier: "Home") as! HomeViewController
let navHomeViewController = UINavigationController(rootViewController: homeViewController)
// user send money view controller
let sendMoneyViewController = UIStoryboard.init(name: "RecipientListViewController", bundle: nil).instantiateViewController(withIdentifier: "RecipientListViewController") as! RecipientListViewController
let navSendMoneyViewController = UINavigationController(rootViewController: sendMoneyViewController)
// Constacts view controller
let contactsViewController = GmeContactsWireframe().getMainView()
let navContactsViewController = UINavigationController(rootViewController: contactsViewController)
// profile view controller
let profileViewController = UIStoryboard.init(name: "Profile", bundle: nil).instantiateViewController(withIdentifier: "ProfileViewController") as! ProfileViewController
let navProfileViewController = UINavigationController(rootViewController: profileViewController)
return [navHomeViewController, navSendMoneyViewController, navContactsViewController, navProfileViewController]
}
func show(index: Int) {
if let view = self.view as? MainViewController {
view.selectedIndex = index
}
}
static func logout() {
guard let window = MainWireframe.shared?.window else {return}
MainWireframe.shared = nil
let storyboard = UIStoryboard.init(name: "Main", bundle: Bundle.main)
let splashScreenViewController = storyboard.instantiateViewController(withIdentifier: "SplashScreenViewController") as! SplashScreenViewController
window.rootViewController = splashScreenViewController
window.makeKeyAndVisible()
}
// func showStoreListing () {
// if !self.isUserWireframe {
// self.show(index: 1)
// self.storeListWireframe.changeOrderType(alphabetic: false)
// }
// }
}

13
GMERemittance/Module/Main/User Interface/Wireframe/MainWireframeInput.swift

@ -0,0 +1,13 @@
//
// MainWireframeInput.swift
// Sipradi
//
// Created by bibek timalsina on 5/26/17.
// Copyright © 2017 Ekbana. All rights reserved.
//
import Foundation
protocol MainWireframeInput: WireframeInput {
func show(index: Int)
}

6
GMERemittance/Module/SendMoneyParent/Application Logic/Interactor/SendMoneyParentInteractor.swift

@ -14,11 +14,11 @@ class SendMoneyParentInteractor {
weak var output: SendMoneyParentInteractorOutput?
private let service: SendMoneyParentServiceType
var reciepient: Recipient
var reciepient: Recipient?
// MARK: Initialization
init(service: SendMoneyParentServiceType, reciepient: Recipient) {
init(service: SendMoneyParentServiceType, reciepient: Recipient?) {
self.service = service
self.reciepient = reciepient
}
@ -30,6 +30,8 @@ class SendMoneyParentInteractor {
extension SendMoneyParentInteractor: SendMoneyParentInteractorInput {
func viewIsReady() {
if let reciepient = self.reciepient {
self.output?.show(model: reciepient)
}
}
}

1
GMERemittance/Module/SendMoneyParent/User Interface/View/SendMoneyParent.storyboard

@ -151,6 +151,7 @@
<constraint firstItem="TTM-k8-r9y" firstAttribute="leading" secondItem="9Uc-9s-KgO" secondAttribute="leading" constant="8" id="x8x-1L-uBa"/>
</constraints>
</view>
<extendedEdge key="edgesForExtendedLayout" bottom="YES"/>
<connections>
<outlet property="containerView" destination="TTM-k8-r9y" id="nQw-NX-HCc"/>
<outlet property="exchangeRateButton" destination="UXe-yi-f7S" id="5x2-7M-I3V"/>

2
GMERemittance/Module/SendMoneyParent/User Interface/Wireframe/SendMoneyParentWireframe.swift

@ -10,7 +10,7 @@ import UIKit
class SendMoneyParentWireframe {
weak var view: UIViewController!
var reciepient: Recipient!
var reciepient: Recipient?
}
extension SendMoneyParentWireframe: SendMoneyParentWireframeInput {

4
GMERemittance/Profile/Profile.storyboard

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="ift-aL-bsv">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="ift-aL-bsv">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
@ -27,7 +27,7 @@
<!--Profile-->
<scene sceneID="d42-Q8-kmE">
<objects>
<viewController id="ift-aL-bsv" customClass="ProfileViewController" customModule="GMERemittance" customModuleProvider="target" sceneMemberID="viewController">
<viewController storyboardIdentifier="ProfileViewController" id="ift-aL-bsv" customClass="ProfileViewController" customModule="GMERemittance" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ead-ne-CIv">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>

4
GMERemittance/Recipient/RecipientListViewController.storyboard

@ -848,7 +848,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" ambiguous="YES" text="Service Fee: " textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1Pl-xL-Gm3">
<rect key="frame" x="94" y="50.5" width="65" height="12"/>
<rect key="frame" x="94" y="50.5" width="201" height="12"/>
<constraints>
<constraint firstAttribute="height" constant="12" id="5yS-wJ-1QD"/>
</constraints>
@ -857,7 +857,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="upto" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dYw-vK-a2G">
<rect key="frame" x="162" y="52.5" width="20" height="12"/>
<rect key="frame" x="298" y="52.5" width="19" height="12"/>
<constraints>
<constraint firstAttribute="height" constant="12" id="d7X-dM-wj1"/>
</constraints>

23
GMERemittance/SideMenu/SideMenuViewController.swift

@ -67,8 +67,27 @@ class SideMenuViewController: UIViewController {
(action : UIAlertAction!) -> Void in
RestApiMananger.sharedInstance.cancelExistingNetworkCalls()
self.logOutUser()
UserDefaults.standard.removePersistentDomain(forName: Bundle.main.bundleIdentifier!)
UserDefaults.standard.synchronize()
let appDelegate = UIApplication.shared.delegate as! AppDelegate
appDelegate.firstTranscationStatusForHome = true
appDelegate.firstTranscationStatusForProfileForm = true
UserDefaults.standard.set(false, forKey: "com.gmeremit.loginStatus")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.dpUrl")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.walletNumber")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.bankName")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.fullName")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.username")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.nickName")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.balance")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.rewardPoint")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.isVerified")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.isKYCSubmitted")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.email")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.mobileNumber")
UserDefaults.standard.removeObject(forKey: "com.gmeremit.password")
UserDefaults.standard.removeObject(forKey: " com.gmeremit.isReferred")
MainWireframe.logout()
})
let noAction = UIAlertAction(title: "No", style: .default, handler: nil)

6
GMERemittance/Splash/SplashScreenViewController.swift

@ -83,7 +83,11 @@ class SplashScreenViewController: UIViewController {
}
return
}
self.performSegue(withIdentifier: "autoLogin", sender: nil)
// self.performSegue(withIdentifier: "autoLogin", sender: nil)
let mainWireFram = MainWireframe.shared
let window = UIApplication.shared.keyWindow
window?.rootViewController = mainWireFram?.getMainView()
window?.makeKeyAndVisible()
} else {
let storyboard = UIStoryboard.init(name: "Main", bundle: Bundle.main)
if let loginViewController = storyboard.instantiateViewController(withIdentifier: "loginViewController") as? LoginViewController {

Loading…
Cancel
Save