Browse Source

removed animation

pull/1/head
gme_2 6 years ago
parent
commit
b74e324799
  1. 33
      GMERemittance/Library/CountryWithFlagPicker/CountryPickerViewController.swift

33
GMERemittance/Library/CountryWithFlagPicker/CountryPickerViewController.swift

@ -77,8 +77,41 @@ class CountryPickerViewController: UIViewController {
self.mainview.layer.cornerRadius = 10
isLanguageSelection ? (self.searchStackViewConstraint.constant = 0) : (self.searchStackViewConstraint.constant = 45)
configureLanguage()
// setupForAnimation()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
// self.animate()
}
func setupForAnimation() {
self.tableVIew.transform = CGAffineTransform.init(translationX: 0, y: self.view.frame.height)
}
func animate() {
UIView.animate(withDuration: 1) {
self.tableVIew.transform = CGAffineTransform.identity
}
guard let tableview = self.tableVIew else {return}
tableview.reloadData()
let cells = tableview.visibleCells
let tableHeight = self.view.bounds.size.height
cells.forEach({
$0.transform = CGAffineTransform(translationX: 0, y: tableHeight)
})
var delayCounter = 0
cells.forEach { (cell) in
UIView.animate(withDuration: 0.4, delay: (Double(delayCounter) * 0.05), usingSpringWithDamping: 0.7, initialSpringVelocity: 0, options: .curveEaseOut, animations: {
cell.transform = CGAffineTransform.identity
}, completion: nil)
delayCounter += 1
}
}
private func setNoResultText() {
self.noResultFoundLabel.text = StringConstants().emptyText

Loading…
Cancel
Save