Skip to content

Commit

Permalink
#4 메인탭바 auth로 이동
Browse files Browse the repository at this point in the history
  • Loading branch information
doyeonk429 committed Dec 29, 2024
1 parent d53ab3f commit ead1348
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright © 2024 DRINKIG. All rights reserved

import UIKit

import CoreModule
import Network

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import UIKit
import CoreModule
import TastingNote
import CommunityModule
import HomeModule

public class MainTabBarController: UITabBarController {

Expand All @@ -22,6 +23,10 @@ public class MainTabBarController: UITabBarController {
if let name = userName {
homeVC.userName = name
classVC.userName = name
} else {
guard let savedName = SelectLoginTypeVC.keychain.get("userNickname") else {return }
homeVC.userName = savedName
classVC.userName = savedName
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public class TestVC: UIViewController {
DispatchQueue.main.async {
let homeTabBarController = MainTabBarController()
homeTabBarController.userName = data.name
SelectLoginTypeVC.keychain.set(data.name, forKey: "userNickname")

print("User name set: \(homeTabBarController.userName)")

Expand Down

0 comments on commit ead1348

Please sign in to comment.