diff --git a/GMERemittance/Module/AddReciepient/Application Logic/Interactor/AddReciepientInteractor.swift b/GMERemittance/Module/AddReciepient/Application Logic/Interactor/AddReciepientInteractor.swift
index e7dd5717..f7a1ea56 100644
--- a/GMERemittance/Module/AddReciepient/Application Logic/Interactor/AddReciepientInteractor.swift
+++ b/GMERemittance/Module/AddReciepient/Application Logic/Interactor/AddReciepientInteractor.swift
@@ -38,7 +38,7 @@ extension AddReciepientInteractor: AddReciepientInteractorInput {
func save(reciepient: Recipient) {
let defaults = UserDefaults.standard
- let myUsername = defaults.string(forKey: "com.gmeremit.username") ?? ""
+ let myUsername = defaults.string(forKey: UserKeys.userId) ?? ""
self.service.save(model: reciepient.serialize(), username: myUsername, success: { (reciepient) in
self.output?.success()
}) { (error) in
diff --git a/GMERemittance/Module/New Group/kycForm3/User Interface/View/kycForm3.storyboard b/GMERemittance/Module/New Group/kycForm3/User Interface/View/kycForm3.storyboard
index 840c6912..1e99a560 100644
--- a/GMERemittance/Module/New Group/kycForm3/User Interface/View/kycForm3.storyboard
+++ b/GMERemittance/Module/New Group/kycForm3/User Interface/View/kycForm3.storyboard
@@ -469,6 +469,11 @@
+
+
+
+
+
diff --git a/GMERemittance/Module/New Group/kycForm3/User Interface/View/kycForm3ViewController.swift b/GMERemittance/Module/New Group/kycForm3/User Interface/View/kycForm3ViewController.swift
index cccd9883..4316ab34 100644
--- a/GMERemittance/Module/New Group/kycForm3/User Interface/View/kycForm3ViewController.swift
+++ b/GMERemittance/Module/New Group/kycForm3/User Interface/View/kycForm3ViewController.swift
@@ -21,7 +21,6 @@ class KycForm3ViewController: UIViewController {
// MARK: IBOutlets
-
// MARK: Properties
var presenter: KycForm3ModuleInterface?
@@ -65,52 +64,27 @@ class KycForm3ViewController: UIViewController {
}
+
+// Residue of the old developer. i just make it workable. I dont have time to remake it all. you can use git histry or "tig" to go back and see what a mess your are.
+
+
+
func showSample(type: PictureType, titleString: String) {
- var imageToShow: UIImage!
- var imageView: UIImageView!
- var vertical_spacing: String!
- var imageHeightConstraint: CGFloat!
- var imageWidthConstraint: CGFloat!
+ let image: UIImage?
switch type {
case .selfie:
-
- imageView = UIImageView(image: #imageLiteral(resourceName: "sampleSelfie"))
- vertical_spacing = String(repeating: "\n", count: 15)
- imageHeightConstraint = imageToShow.size.height * 0.825
- imageWidthConstraint = imageToShow.size.width * 0.825
+ image = #imageLiteral(resourceName: "sampleSelfie")
case .front:
- imageView = UIImageView(image: #imageLiteral(resourceName: "sampleFront"))
- vertical_spacing = String(repeating: "\n", count: 10)
- imageHeightConstraint = imageToShow.size.height * 0.9
- imageWidthConstraint = imageToShow.size.width * 0.9
+ image = #imageLiteral(resourceName: "sampleFront")
case .back:
- imageView = UIImageView(image: #imageLiteral(resourceName: "sampleBack"))
- vertical_spacing = String(repeating: "\n", count: 10)
- imageHeightConstraint = imageToShow.size.height * 0.9 //initially 150
- imageWidthConstraint = imageToShow.size.width * 0.9 //initially 200
+ image = #imageLiteral(resourceName: "sampleBack")
case .passbook:
- imageView = UIImageView(image: #imageLiteral(resourceName: "samplePassbook"))
- vertical_spacing = String(repeating: "\n", count: 12)
- imageHeightConstraint = imageToShow.size.height * 1.2 //initially 150
- imageWidthConstraint = imageToShow.size.width * 1.2 //initially 200
+ image = #imageLiteral(resourceName: "sampleBack")
case .passport:
- imageView = UIImageView(image: #imageLiteral(resourceName: "samplePassport"))
- vertical_spacing = String(repeating: "\n", count: 12)
- imageHeightConstraint = imageToShow.size.height * 1.2 //initially 150
- imageWidthConstraint = imageToShow.size.width * 1.2 //initially 200
+ image = #imageLiteral(resourceName: "sampleBack")
}
-
- let alert = UIAlertController(title: titleString, message: vertical_spacing, preferredStyle: .alert)
- alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: nil))
- alert.view.addSubview(imageView)
- imageView.translatesAutoresizingMaskIntoConstraints = false
- alert.view.addConstraint(NSLayoutConstraint(item: imageView, attribute: .centerX, relatedBy: .equal, toItem: alert.view, attribute: .centerX, multiplier: 1, constant: 0))
- alert.view.addConstraint(NSLayoutConstraint(item: imageView, attribute: .centerY, relatedBy: .equal, toItem: alert.view, attribute: .centerY, multiplier: 1, constant: 0))
- alert.view.addConstraint(NSLayoutConstraint(item: imageView, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1.0, constant: imageWidthConstraint))
- alert.view.addConstraint(NSLayoutConstraint(item: imageView, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1.0, constant: imageHeightConstraint))
- alert.view.tintColor = UIColor(hex: 0xEC1C24)
- self.present(alert, animated: true, completion: nil)
+ // show alert
}
}
diff --git a/Podfile b/Podfile
index 49e82c9a..fb3b4b5a 100644
--- a/Podfile
+++ b/Podfile
@@ -17,7 +17,7 @@ pod 'ObjectMapper', '~> 3.3'
pod 'MBProgressHUD', '~> 1.1.0'
pod 'Hex'
pod 'XLPagerTabStrip', '~> 8.0'
-
+pod 'PMAlertController'
pod 'AlamofireNetworkActivityLogger', '~> 2.3'
pod 'IQKeyboardManagerSwift'
pod 'thenPromise'