Skip to content

Commit e65f911

Browse files
committed
confirmed viper protocols
1 parent 8e3dd08 commit e65f911

4 files changed

Lines changed: 158 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
//
2+
// DetailController.swift
3+
// ICTMDBDetailModule
4+
//
5+
// Created by Engin Gülek on 12.11.2025.
6+
//
7+
import UIKit
8+
import GenericCollectionViewKit
9+
import ICTMDBViewKit
10+
import SnapKit
11+
12+
final class TvShowDetailViewController: UIViewController {
13+
14+
// MARK: - Properties
15+
var presenter: (any ViewToPresenterTvShowDetailProtocol)?
16+
17+
18+
19+
// MARK: - Lifecycle
20+
override func viewDidLoad() {
21+
super.viewDidLoad()
22+
23+
24+
presenter?.viewDidLoad()
25+
}
26+
27+
28+
}
29+
30+
extension TvShowDetailViewController: @preconcurrency PresenterToViewTvShowDetailProtocol {
31+
func sendData() {
32+
33+
}
34+
35+
func prepareCollectionView() {
36+
37+
}
38+
39+
func relaodCollectionView() {
40+
41+
}
42+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//
2+
// DetailInteractor.swift
3+
// ICTMDBDetailModule
4+
//
5+
// Created by Engin Gülek on 12.11.2025.
6+
//
7+
8+
9+
final class TvShowDetailInteractor : PresenterToInteractorTvShowDetailProtocol {
10+
11+
var presenter: (any InteractorToPresenterTvShowDetailProtocol)?
12+
13+
14+
15+
16+
func loadTvShowDetail(id: Int?) {
17+
18+
}
19+
20+
func loadTvShowCasts(id: Int?) {
21+
22+
}
23+
}
24+
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
//
2+
// DetailPresenter.swift
3+
// ICTMDBDetailModule
4+
//
5+
// Created by Engin Gülek on 12.11.2025.
6+
//
7+
import Foundation
8+
import ICTMDBViewKit
9+
import GenericCollectionViewKit
10+
11+
final class TvShowDetailPresenter {
12+
weak var view: PresenterToViewTvShowDetailProtocol?
13+
14+
private var interactor: PresenterToInteractorTvShowDetailProtocol
15+
16+
17+
init(view: PresenterToViewTvShowDetailProtocol?,
18+
interactor: PresenterToInteractorTvShowDetailProtocol) {
19+
self.view = view
20+
self.interactor = interactor
21+
}
22+
23+
func viewDidLoad() {
24+
view?.setBackColorAble(color: "backColor")
25+
26+
}
27+
}
28+
29+
extension TvShowDetailPresenter: ViewToPresenterTvShowDetailProtocol {
30+
func layout(for sectionIndex: Int) -> LayoutSource {
31+
32+
}
33+
34+
func getID(id: Int?) {
35+
guard let id = id else {return}
36+
37+
38+
}
39+
40+
func numberOfRowsInSection(in section: Int) -> Int {
41+
42+
}
43+
44+
func numberOfSections() -> Int {
45+
46+
}
47+
48+
func cellForItem(section: Int,item:Int) -> CellItemType {
49+
50+
}
51+
52+
53+
54+
func titleForSection(at section: Int) -> (
55+
title: String, sizeType:SectionSizeType,
56+
buttonType: [TitleForSectionButtonType]?) {
57+
58+
}
59+
60+
func sectionType(at section: Int) -> SectionType {
61+
62+
}
63+
64+
func cellIdentifier(at section: Int) -> String {
65+
66+
}
67+
}
68+
69+
extension TvShowDetailPresenter: InteractorToPresenterTvShowDetailProtocol {
70+
func onHandle(handle: TvShowInteractorResult) {
71+
72+
}
73+
}

ICTMDBDetailModule/enums.swift

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// enums.swift
3+
// ICTMDBDetailModule
4+
//
5+
// Created by Engin Gülek on 12.11.2025.
6+
//
7+
8+
enum SectionType: Int, CaseIterable {
9+
case cast
10+
case season
11+
12+
}
13+
14+
enum CellItemType {
15+
case cast
16+
case season
17+
case none
18+
}
19+

0 commit comments

Comments
 (0)