Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Remove Constants with Develop Conflicts resolved #40

Merged
merged 1 commit into from
Sep 28, 2023
Merged
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
12 changes: 8 additions & 4 deletions MovieApp/MovieApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
7DDE9C2D2787D6EE00938996 /* MainTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DDE9C2C2787D6EE00938996 /* MainTabBarController.swift */; };
7DDE9C302787E0C700938996 /* ChartViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DDE9C2F2787E0C700938996 /* ChartViewController.swift */; };
7DDE9C322788045B00938996 /* ChartTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DDE9C312788045B00938996 /* ChartTableViewCell.swift */; };
7DE8154327910DDC00726799 /* Keys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DE8154227910DDC00726799 /* Keys.swift */; };
9440E7322AC440A1000CE141 /* GenreModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9440E7312AC440A1000CE141 /* GenreModel.swift */; };
9440E7342AC44102000CE141 /* Keys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9440E7332AC44102000CE141 /* Keys.swift */; };
9F38C115EB6AF0EEE6B8E0C5 /* Pods_MovieApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1333EC5F83FAB13E0CD0D899 /* Pods_MovieApp.framework */; };
/* End PBXBuildFile section */

Expand Down Expand Up @@ -80,7 +81,8 @@
7DDE9C2C2787D6EE00938996 /* MainTabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTabBarController.swift; sourceTree = "<group>"; };
7DDE9C2F2787E0C700938996 /* ChartViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChartViewController.swift; sourceTree = "<group>"; };
7DDE9C312788045B00938996 /* ChartTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChartTableViewCell.swift; sourceTree = "<group>"; };
7DE8154227910DDC00726799 /* Keys.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Keys.swift; sourceTree = "<group>"; };
9440E7312AC440A1000CE141 /* GenreModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GenreModel.swift; sourceTree = "<group>"; };
9440E7332AC44102000CE141 /* Keys.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Keys.swift; sourceTree = "<group>"; };
FDA2E981A792A2B7397508AB /* Pods-MovieApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MovieApp.release.xcconfig"; path = "Target Support Files/Pods-MovieApp/Pods-MovieApp.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -213,7 +215,7 @@
isa = PBXGroup;
children = (
7D37AD9F278D5C97004BBFF9 /* APIService.swift */,
7DE8154227910DDC00726799 /* Keys.swift */,
9440E7332AC44102000CE141 /* Keys.swift */,
);
path = Service;
sourceTree = "<group>";
Expand All @@ -224,6 +226,7 @@
7D37ADA1278D5CE7004BBFF9 /* MovieList.swift */,
7D9D9F49278E928C0098FEA3 /* MovieFront.swift */,
7D202FAD27B262A6008F8051 /* MovieDetail.swift */,
9440E7312AC440A1000CE141 /* GenreModel.swift */,
);
path = Model;
sourceTree = "<group>";
Expand Down Expand Up @@ -468,16 +471,17 @@
7D40A08127BCC91E002C21FE /* DescriptionView.swift in Sources */,
7D2DD62527855A30000EBDE0 /* DiscoverCollectionHeaderView.swift in Sources */,
7D37ADA2278D5CE7004BBFF9 /* MovieList.swift in Sources */,
9440E7342AC44102000CE141 /* Keys.swift in Sources */,
7DDE9C2D2787D6EE00938996 /* MainTabBarController.swift in Sources */,
7D40A07F27BCC33D002C21FE /* IconLabel.swift in Sources */,
7D88534027BA1E7500CC915E /* DetailViewController.swift in Sources */,
7DDE9C302787E0C700938996 /* ChartViewController.swift in Sources */,
9440E7322AC440A1000CE141 /* GenreModel.swift in Sources */,
7D0408B72A94815200402458 /* Cache.swift in Sources */,
7D9D9F4A278E928C0098FEA3 /* MovieFront.swift in Sources */,
7D7A7D3A2A7E744100E7879A /* ImageCacheManager.swift in Sources */,
7D85FCB42AB9B77800570222 /* UIImageViewExtension.swift in Sources */,
7D947CA9278C03E00031C7C9 /* CreditViewController.swift in Sources */,
7DE8154327910DDC00726799 /* Keys.swift in Sources */,
7D90EC1B27D5EC160099B485 /* CreditHeaderView.swift in Sources */,
7DC7D34727913C89005C3D9C /* DiscoverViewModel.swift in Sources */,
7D15F0DA27D726E50029C40F /* CreditFootherView.swift in Sources */,
Expand Down
30 changes: 0 additions & 30 deletions MovieApp/MovieApp/Constant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@

import Foundation


struct Colors {
static let background = "BgColor"
static let light_background = "LightBgColor"
static let placeholder = "PlaceholderTextColor"
}

struct identifiers {
static let discover_collection_cell = "DiscoverCollectionCell"
static let discover_collection_header = "DiscoverCollectionHeader"
Expand All @@ -26,26 +19,3 @@ struct identifiers {
static let detail_trailer_collection_Cell = "DetailTrailerCollectionCell"
static let detail_cast_collection_Cell = "DetailCastCollectionCell"
}


let genreCode = [
28 : "Action",
12 : "Adventure",
16 : "Animation",
35 : "Comedy",
80 : "Crime",
99 : "Documentary",
18 : "Drama",
10751 : "Family",
14 : "Fantasy",
36 : "History",
27 : "Horror",
10402 : "Music",
9648 : "Mystery",
10749 : "Romance",
878 : "Science Fiction",
10770 : "TV Movie",
53 : "Thriller",
10752 : "War",
37 : "Western"
]
30 changes: 30 additions & 0 deletions MovieApp/MovieApp/Domain/Model/GenreModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//
// GenreModel.swift
// MovieApp
//
// Created by Aakif Nadeem on 27/09/2023.
//

import Foundation

let genreCode = [
28 : "Action",
12 : "Adventure",
16 : "Animation",
35 : "Comedy",
80 : "Crime",
99 : "Documentary",
18 : "Drama",
10751 : "Family",
14 : "Fantasy",
36 : "History",
27 : "Horror",
10402 : "Music",
9648 : "Mystery",
10749 : "Romance",
878 : "Science Fiction",
10770 : "TV Movie",
53 : "Thriller",
10752 : "War",
37 : "Western"
]
6 changes: 6 additions & 0 deletions MovieApp/MovieApp/Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ extension UIImage {
}

}

extension UIColor {
static let background = "BgColor"
static let light_background = "LightBgColor"
static let placeholder = "PlaceholderTextColor"
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class ChartTableViewCell: UITableViewCell {
$0.spacing = 5
}

self.backgroundColor = UIColor(named: Colors.background)
self.backgroundColor = UIColor(named: UIColor.background)
self.selectionStyle = .none

//MARK: Set Constraints
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ChartViewController: UIViewController {

// MARK: - UI Components
lazy var tableView = UITableView().then {
$0.backgroundColor = UIColor(named: Colors.background)
$0.backgroundColor = UIColor(named: UIColor.background)
$0.allowsSelection = true
$0.register(ChartTableViewCell.self, forCellReuseIdentifier: identifiers.chart_table_cell)

Expand All @@ -26,7 +26,7 @@ class ChartViewController: UIViewController {
lazy var navigationAppearance = UINavigationBarAppearance().then {
$0.titleTextAttributes = [.foregroundColor: UIColor.white]
$0.largeTitleTextAttributes = [.foregroundColor: UIColor.white]
$0.backgroundColor = UIColor(named: Colors.background)
$0.backgroundColor = UIColor(named: UIColor.background)
}

// MARK: - Instances
Expand All @@ -52,7 +52,7 @@ class ChartViewController: UIViewController {

private func setUpView() {

self.view.backgroundColor = UIColor(named: Colors.background)
self.view.backgroundColor = UIColor(named: UIColor.background)
self.view.addSubview(tableView)
self.tableView.dataSource = self
self.tableView.delegate = self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class CreditTableViewDescriptionCell: UITableViewCell {

private func setupView() {
self.addSubview(descriptionView)
descriptionView.backgroundColor = UIColor(named: Colors.background)
descriptionView.backgroundColor = UIColor(named: UIColor.background)

descriptionView.snp.makeConstraints { $0.edges.equalToSuperview() }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ class CreditViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = UIColor(named: Colors.background)
self.view.backgroundColor = UIColor(named: UIColor.background)

tableView = UITableView(frame: self.view.frame, style: .insetGrouped)
tableView.backgroundColor = UIColor(named: Colors.background)
tableView.separatorColor = UIColor(named: Colors.background)
tableView.backgroundColor = UIColor(named: UIColor.background)
tableView.separatorColor = UIColor(named: UIColor.background)
tableView.register(UITableViewCell.self, forCellReuseIdentifier: identifiers.credit_table_cell)
tableView.bounces = false

Expand Down Expand Up @@ -60,7 +60,7 @@ extension CreditViewController: UITableViewDataSource {
if indexPath.section == 0 {
let cell = tableView.dequeueReusableCell(withIdentifier: identifiers.credit_table_cell, for: indexPath) as UITableViewCell

cell.backgroundColor = UIColor(named: Colors.light_background)
cell.backgroundColor = UIColor(named: UIColor.light_background)
cell.textLabel?.textColor = .white

let data = ExternalLink.data[indexPath.row]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class DetailViewController: UIViewController {

private func setUpView() {
self.navigationController?.setNavigationBarHidden(true, animated: false)
self.view.backgroundColor = UIColor(named: Colors.background)
self.view.backgroundColor = UIColor(named: UIColor.background)
scrollView.contentInsetAdjustmentBehavior = .never
scrollView.bounces = false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ class DiscoverCollectionHeaderView: UICollectionReusableView {

lazy var searchField = PaddingTextField().then {
$0.layer.cornerRadius = 20
$0.backgroundColor = UIColor(named: Colors.light_background)
$0.backgroundColor = UIColor(named: UIColor.light_background)
$0.textColor = .white

let placeholderColor = UIColor(named: Colors.placeholder) ?? UIColor.lightGray
let placeholderColor = UIColor(named: UIColor.placeholder) ?? UIColor.lightGray
$0.attributedPlaceholder = NSAttributedString(
string: "Search...",
attributes: [NSAttributedString.Key.foregroundColor: placeholderColor]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class DiscoverViewController: UIViewController {
var collectionView = UICollectionView(frame: self.view.frame, collectionViewLayout: flowLayout)
collectionView.register(DiscoverCollectionViewCell.self, forCellWithReuseIdentifier: identifiers.discover_collection_cell)
collectionView.register(DiscoverCollectionHeaderView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: identifiers.discover_collection_header)
collectionView.backgroundColor = UIColor(named: Colors.background)
collectionView.backgroundColor = UIColor(named: UIColor.background)

return collectionView
}()
Expand All @@ -45,7 +45,7 @@ class DiscoverViewController: UIViewController {

private func setUpView() {
self.title = "Discover"
self.view.backgroundColor = UIColor(named: Colors.background)
self.view.backgroundColor = UIColor(named: UIColor.background)
self.dismissKeyboard()

collectionView.dataSource = self
Expand Down
2 changes: 1 addition & 1 deletion MovieApp/MovieApp/Presentation/MainTabBarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class MainTabBarController: UITabBarController, UITabBarControllerDelegate {

let appearance = UITabBarAppearance().then {
$0.configureWithOpaqueBackground()
$0.backgroundColor = UIColor(named: Colors.light_background)
$0.backgroundColor = UIColor(named: UIColor.light_background)
}

override func viewDidLoad() {
Expand Down