diff --git a/iOS/baseballApp/baseballApp/Domain/Usecase/GameUsecase.swift b/iOS/baseballApp/baseballApp/Domain/Usecase/GameUsecase.swift index b8bf96b56..45b1fa494 100644 --- a/iOS/baseballApp/baseballApp/Domain/Usecase/GameUsecase.swift +++ b/iOS/baseballApp/baseballApp/Domain/Usecase/GameUsecase.swift @@ -3,9 +3,9 @@ import RxSwift class GameUsecase: UsecasePort { private var games = [Game]() - private lazy var gameStorage = BehaviorSubject<[Game]>(value: games) private var disposeBag = DisposeBag() + func appendGame(from data: Game) -> Observable { games.append(data) gameStorage.onNext(games) diff --git a/iOS/baseballApp/baseballApp/Domain/Usecase/UsecasePort.swift b/iOS/baseballApp/baseballApp/Domain/Usecase/UsecasePort.swift index 512ff1e19..b23a9e16d 100644 --- a/iOS/baseballApp/baseballApp/Domain/Usecase/UsecasePort.swift +++ b/iOS/baseballApp/baseballApp/Domain/Usecase/UsecasePort.swift @@ -2,7 +2,6 @@ import Foundation import RxSwift protocol UsecasePort { - @discardableResult func appendGame(from data: Game) -> Observable diff --git a/iOS/baseballApp/baseballApp/Presentation/UI/View/GameCell.swift b/iOS/baseballApp/baseballApp/Presentation/UI/View/GameCell.swift index c185ad5e6..1ec450154 100644 --- a/iOS/baseballApp/baseballApp/Presentation/UI/View/GameCell.swift +++ b/iOS/baseballApp/baseballApp/Presentation/UI/View/GameCell.swift @@ -1,12 +1,8 @@ import UIKit -enum Identifier { - static let GameCell = "GameCell" -} - class GameCell: UICollectionViewCell { + static let identifier = "GameCell" - @IBOutlet weak var gameIdLabel: UILabel! @IBOutlet weak var homeTeamLabel: UILabel! @IBOutlet weak var awayTeamLabel: UILabel! diff --git a/iOS/baseballApp/baseballApp/Presentation/UI/ViewController/HomeViewController.swift b/iOS/baseballApp/baseballApp/Presentation/UI/ViewController/HomeViewController.swift index 80a1be6c9..12a7998da 100644 --- a/iOS/baseballApp/baseballApp/Presentation/UI/ViewController/HomeViewController.swift +++ b/iOS/baseballApp/baseballApp/Presentation/UI/ViewController/HomeViewController.swift @@ -16,7 +16,7 @@ class HomeViewController: UIViewController { private func bindCollectionView() { viewModel.getGameInfo() viewModel.games - .bind(to: mainCollectionView.rx.items(cellIdentifier: Identifier.GameCell, cellType: GameCell.self)) { + .bind(to: mainCollectionView.rx.items(cellIdentifier: GameCell.identifier, cellType: GameCell.self)) { row, game, cell in cell.configureCell(game: game)