Browse Source

added pmcontroller in pod file

pull/1/head
gme_2 6 years ago
parent
commit
e913c826ec
  1. 2
      GMERemittance/Module/AddReciepient/Application Logic/Interactor/AddReciepientInteractor.swift
  2. 5
      GMERemittance/Module/New Group/kycForm3/User Interface/View/kycForm3.storyboard
  3. 50
      GMERemittance/Module/New Group/kycForm3/User Interface/View/kycForm3ViewController.swift
  4. 2
      Podfile

2
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

5
GMERemittance/Module/New Group/kycForm3/User Interface/View/kycForm3.storyboard

@ -469,6 +469,11 @@
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="8je-5K-XuW" userLabel="First Responder" sceneMemberID="firstResponder"/>
<view contentMode="scaleToFill" id="PUB-Qe-sum">
<rect key="frame" x="0.0" y="0.0" width="240" height="128"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
</objects>
<point key="canvasLocation" x="-91" y="233"/>
</scene>

50
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
}
}

2
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'

Loading…
Cancel
Save