Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions chat-iOS/Views/MainTabBar/MainTabBarViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ final class MainTabBarViewController: UITabBarController {
let userProfileVC = UserProfileViewBuilder.create()
let userProfileNavigationController = UINavigationController(rootViewController: userProfileVC)

//TODO:- ここはチャットセレクト画面に遷移すること
let chatsVC = ChatsViewBuilder.create()
let chatsNavigationController = UINavigationController(rootViewController: chatsVC)
let selectChatVC = SelectChatViewBuilder.create()
let selectChatNavigationController = UINavigationController(rootViewController: selectChatVC)

//TODO:- iOS12以下の場合の画像を用意すること
if #available(iOS 13.0, *) {
Expand All @@ -35,12 +34,12 @@ final class MainTabBarViewController: UITabBarController {
let userProfileTabBarItemSelectedImage = UIImage(systemName: "person.circle.fill")

userProfileVC.tabBarItem = UITabBarItem(title: nil, image: userProfileTabBarItemImage, selectedImage: userProfileTabBarItemSelectedImage)
chatsVC.tabBarItem = UITabBarItem(title: nil, image: chatsTabBarItemImage, selectedImage: chatsTabBarItemSelectedImage)
selectChatVC.tabBarItem = UITabBarItem(title: nil, image: chatsTabBarItemImage, selectedImage: chatsTabBarItemSelectedImage)
} else {
// Fallback on earlier versions
}

self.viewControllers = [chatsNavigationController, userProfileNavigationController]
self.viewControllers = [selectChatNavigationController, userProfileNavigationController]
}

func inject(with presenter: MainTabBarViewPresenterProtocol) {
Expand Down
11 changes: 10 additions & 1 deletion chat-iOS/Views/SelectChat/SelectChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,23 @@ final class SelectChatViewController: UIViewController {
extension SelectChatViewController: UITableViewDelegate, UITableViewDataSource {

func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return users.count
//TODO:- userModelを作ったら,`return users.count` に修正すること
return 5
}

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: reuseCellId) as! SelectChatTableViewCell

return cell
}

func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
self.tableView.deselectRow(at: indexPath, animated: true)

//MARK:- チャットVCに画面遷移する
let chatsVC = ChatsViewBuilder.create()
self.navigationController?.pushViewController(chatsVC, animated: true)
}

}

Expand Down