|
|
@ -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 |
|
|
|