|
|
@ -44,9 +44,8 @@ class HomeViewController: UIViewController, UICollectionViewDelegateFlowLayout { |
|
|
|
|
|
|
|
override func viewWillAppear(_ animated: Bool) { |
|
|
|
super.viewWillAppear(animated) |
|
|
|
self.setupPicturedNavBar() |
|
|
|
configureViews() |
|
|
|
self.setActionBarIcons(showNotificationParameter: false) // set true if there is unread notification |
|
|
|
self.showUnverifiedNotice() |
|
|
|
} |
|
|
|
|
|
|
|
override func viewWillDisappear(_ animated: Bool) { |
|
|
@ -56,7 +55,7 @@ class HomeViewController: UIViewController, UICollectionViewDelegateFlowLayout { |
|
|
|
// MARK: IBActions |
|
|
|
|
|
|
|
@IBAction func closeVerificationNotice(_ sender: UIButton) { |
|
|
|
|
|
|
|
return |
|
|
|
let animator = UIViewPropertyAnimator(duration: 0.4, curve: .easeOut ) |
|
|
|
animator.addAnimations { |
|
|
|
self.verificationNoticeView.alpha = 0 |
|
|
@ -76,7 +75,6 @@ class HomeViewController: UIViewController, UICollectionViewDelegateFlowLayout { |
|
|
|
private func setup() { |
|
|
|
// all setup should be done here |
|
|
|
setupDelegates() |
|
|
|
configureViews() |
|
|
|
setupNotifications() |
|
|
|
} |
|
|
|
|
|
|
@ -165,11 +163,14 @@ class HomeViewController: UIViewController, UICollectionViewDelegateFlowLayout { |
|
|
|
|
|
|
|
private func showUnverifiedNotice() { |
|
|
|
if !self.isUserVerified() { |
|
|
|
self.verificationNoticeHeightConstraint.constant = Constants.verificationNoticeHeight |
|
|
|
UIView.animate(withDuration: 0.33) { |
|
|
|
self.verificationNoticeHeightConstraint.constant = Constants.verificationNoticeHeight |
|
|
|
self.verificationNoticeView.alpha = 1 |
|
|
|
self.view.layoutIfNeeded() |
|
|
|
} |
|
|
|
}else { |
|
|
|
self.verificationNoticeHeightConstraint.constant = 0 |
|
|
|
self.view.layoutIfNeeded() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -189,7 +190,7 @@ class HomeViewController: UIViewController, UICollectionViewDelegateFlowLayout { |
|
|
|
} |
|
|
|
|
|
|
|
private func isUserVerified() -> Bool { |
|
|
|
return false |
|
|
|
// return false |
|
|
|
let val = (UserDefaults.standard.object(forKey: UserKeys.verified) as? Bool ) ?? false |
|
|
|
print(val) |
|
|
|
return val |
|
|
@ -260,7 +261,8 @@ extension HomeViewController: UITableViewDelegate { |
|
|
|
let totalHeight = view.frame.height |
|
|
|
let ramainingBalanceCellHeight: CGFloat = 100 |
|
|
|
let finalHeight = totalHeight - ramainingBalanceCellHeight |
|
|
|
return self.menuHeight ?? finalHeight |
|
|
|
return finalHeight |
|
|
|
// return self.menuHeight ?? finalHeight |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|