Skip to content

Commit 5c388d3

Browse files
committed
Add AuthDelegate protocol loginVC -> mainHomeVC
1 parent b6f8771 commit 5c388d3

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Clone App/Instagram/Instagram/Controller/FeedController.swift

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class FeedController: UICollectionViewController {
1616
override func viewDidLoad() {
1717
super.viewDidLoad()
1818
collectionView.register(FeedCell.self, forCellWithReuseIdentifier: reuseIdentifier )
19-
setupUI()
19+
setupNavigationUI()
2020

2121
}
2222
}
@@ -25,10 +25,21 @@ class FeedController: UICollectionViewController {
2525
extension FeedController {
2626

2727
func setupUI() {
28+
setupNavigationUI()
2829
view.backgroundColor = .white
30+
}
31+
func setupNavigationUI() {
2932
setupLogoutBarButton()
3033
navigationItem.title = "Feed"
3134
}
35+
36+
func presentLoginScene() {
37+
let controller = LoginController()
38+
controller.authDelegate = tabBarController as? MainHomeTabController
39+
let nav = UINavigationController(rootViewController: controller)
40+
nav.modalPresentationStyle = .fullScreen
41+
self.present(nav,animated: false, completion: nil)
42+
}
3243
}
3344

3445
//MARK: - UICollectionView DataSource

0 commit comments

Comments
 (0)