Skip to content

Commit

Permalink
Add AuthDelegate protocol loginVC -> mainHomeVC
Browse files Browse the repository at this point in the history
  • Loading branch information
SHcommit committed Nov 1, 2022
1 parent b6f8771 commit 5c388d3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Clone App/Instagram/Instagram/Controller/FeedController.swift
Expand Up @@ -16,7 +16,7 @@ class FeedController: UICollectionViewController {
override func viewDidLoad() {
super.viewDidLoad()
collectionView.register(FeedCell.self, forCellWithReuseIdentifier: reuseIdentifier )
setupUI()
setupNavigationUI()

}
}
Expand All @@ -25,10 +25,21 @@ class FeedController: UICollectionViewController {
extension FeedController {

func setupUI() {
setupNavigationUI()
view.backgroundColor = .white
}
func setupNavigationUI() {
setupLogoutBarButton()
navigationItem.title = "Feed"
}

func presentLoginScene() {
let controller = LoginController()
controller.authDelegate = tabBarController as? MainHomeTabController
let nav = UINavigationController(rootViewController: controller)
nav.modalPresentationStyle = .fullScreen
self.present(nav,animated: false, completion: nil)
}
}

//MARK: - UICollectionView DataSource
Expand Down

0 comments on commit 5c388d3

Please sign in to comment.