diff --git a/Pods/Pods.xcodeproj/xcuserdata/aziza.xcuserdatad/xcschemes/xcschememanagement.plist b/Pods/Pods.xcodeproj/xcuserdata/aziza.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..969dfd4 --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/aziza.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,49 @@ + + + + + SchemeUserState + + Alamofire.xcscheme_^#shared#^_ + + orderHint + 1 + + MarqueeLabel.xcscheme_^#shared#^_ + + orderHint + 0 + + Pods-SportsApp.xcscheme_^#shared#^_ + + orderHint + 7 + + ProgressHUD.xcscheme_^#shared#^_ + + orderHint + 4 + + ReachabilitySwift.xcscheme_^#shared#^_ + + orderHint + 2 + + SDWebImage.xcscheme_^#shared#^_ + + orderHint + 5 + + SkeletonView.xcscheme_^#shared#^_ + + orderHint + 6 + + lottie-ios.xcscheme_^#shared#^_ + + orderHint + 8 + + + + diff --git a/SportsApp.xcodeproj/project.pbxproj b/SportsApp.xcodeproj/project.pbxproj index 21f30a3..0441c54 100644 --- a/SportsApp.xcodeproj/project.pbxproj +++ b/SportsApp.xcodeproj/project.pbxproj @@ -14,8 +14,14 @@ 3E17D3952817733200910F14 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3E17D3942817733200910F14 /* Assets.xcassets */; }; 3E17D3982817733200910F14 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3E17D3962817733200910F14 /* LaunchScreen.storyboard */; }; 3EB1D36228188EAB004A7ABC /* SplashViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EB1D36128188EAB004A7ABC /* SplashViewController.swift */; }; - 3EB1D36428189335004A7ABC /* splash.json in Resources */ = {isa = PBXBuildFile; fileRef = 3EB1D36328189335004A7ABC /* splash.json */; }; 7FD18F845F48772426796230 /* Pods_SportsApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8FCAA82DAF02A6D3756DCEC /* Pods_SportsApp.framework */; }; + 8F7DE566281B3E2600EC2EC1 /* splash.json in Resources */ = {isa = PBXBuildFile; fileRef = 8F7DE565281B3E2600EC2EC1 /* splash.json */; }; + 8F9395D7281C048300FA612F /* LeaguesDetailsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F9395D6281C048300FA612F /* LeaguesDetailsViewController.swift */; }; + 8F9395D9281C0BBE00FA612F /* TeamsCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F9395D8281C0BBE00FA612F /* TeamsCollectionViewCell.swift */; }; + 8F9395DB281C0BE000FA612F /* EventsCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F9395DA281C0BE000FA612F /* EventsCollectionViewCell.swift */; }; + 8F9395DD281C0BF400FA612F /* ResultsCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F9395DC281C0BF400FA612F /* ResultsCollectionViewCell.swift */; }; + 8F9395DF281C33CE00FA612F /* Teams.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F9395DE281C33CE00FA612F /* Teams.swift */; }; + 8F9395E1281C33DF00FA612F /* Events.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F9395E0281C33DF00FA612F /* Events.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -28,8 +34,14 @@ 3E17D3972817733200910F14 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 3E17D3992817733200910F14 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 3EB1D36128188EAB004A7ABC /* SplashViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashViewController.swift; sourceTree = ""; }; - 3EB1D36328189335004A7ABC /* splash.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = splash.json; path = ../../../../../../splash.json; sourceTree = ""; }; 4D30B850271081D3AB6212D5 /* Pods-SportsApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SportsApp.debug.xcconfig"; path = "Target Support Files/Pods-SportsApp/Pods-SportsApp.debug.xcconfig"; sourceTree = ""; }; + 8F7DE565281B3E2600EC2EC1 /* splash.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = splash.json; path = ../../../../../Downloads/splash.json; sourceTree = ""; }; + 8F9395D6281C048300FA612F /* LeaguesDetailsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LeaguesDetailsViewController.swift; sourceTree = ""; }; + 8F9395D8281C0BBE00FA612F /* TeamsCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TeamsCollectionViewCell.swift; sourceTree = ""; }; + 8F9395DA281C0BE000FA612F /* EventsCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventsCollectionViewCell.swift; sourceTree = ""; }; + 8F9395DC281C0BF400FA612F /* ResultsCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResultsCollectionViewCell.swift; sourceTree = ""; }; + 8F9395DE281C33CE00FA612F /* Teams.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Teams.swift; sourceTree = ""; }; + 8F9395E0281C33DF00FA612F /* Events.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Events.swift; sourceTree = ""; }; AE60A169A1E11D55D312E911 /* Pods-SportsApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SportsApp.release.xcconfig"; path = "Target Support Files/Pods-SportsApp/Pods-SportsApp.release.xcconfig"; sourceTree = ""; }; F8FCAA82DAF02A6D3756DCEC /* Pods_SportsApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SportsApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -90,6 +102,8 @@ 3EB1D34F281887A1004A7ABC /* Model */ = { isa = PBXGroup; children = ( + 8F9395E0281C33DF00FA612F /* Events.swift */, + 8F9395DE281C33CE00FA612F /* Teams.swift */, 3EB1D35A281888B8004A7ABC /* Data */, 3EB1D359281888AA004A7ABC /* RemoteData */, 3EB1D3582818889C004A7ABC /* LocalData */, @@ -130,7 +144,7 @@ 3EB1D35328188814004A7ABC /* SplashScreen */ = { isa = PBXGroup; children = ( - 3EB1D36328189335004A7ABC /* splash.json */, + 8F7DE565281B3E2600EC2EC1 /* splash.json */, 3EB1D36128188EAB004A7ABC /* SplashViewController.swift */, ); path = SplashScreen; @@ -153,6 +167,10 @@ 3EB1D35628188844004A7ABC /* LeaguesDetailsScreen */ = { isa = PBXGroup; children = ( + 8F9395DC281C0BF400FA612F /* ResultsCollectionViewCell.swift */, + 8F9395DA281C0BE000FA612F /* EventsCollectionViewCell.swift */, + 8F9395D8281C0BBE00FA612F /* TeamsCollectionViewCell.swift */, + 8F9395D6281C048300FA612F /* LeaguesDetailsViewController.swift */, ); path = LeaguesDetailsScreen; sourceTree = ""; @@ -271,7 +289,7 @@ files = ( 3E17D3982817733200910F14 /* LaunchScreen.storyboard in Resources */, 3E17D3952817733200910F14 /* Assets.xcassets in Resources */, - 3EB1D36428189335004A7ABC /* splash.json in Resources */, + 8F7DE566281B3E2600EC2EC1 /* splash.json in Resources */, 3E17D3902817733000910F14 /* Main.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -325,9 +343,15 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 8F9395DF281C33CE00FA612F /* Teams.swift in Sources */, 3E17D3892817733000910F14 /* AppDelegate.swift in Sources */, 3E17D3932817733000910F14 /* SportsApp.xcdatamodeld in Sources */, 3E17D38B2817733000910F14 /* SceneDelegate.swift in Sources */, + 8F9395E1281C33DF00FA612F /* Events.swift in Sources */, + 8F9395DD281C0BF400FA612F /* ResultsCollectionViewCell.swift in Sources */, + 8F9395D9281C0BBE00FA612F /* TeamsCollectionViewCell.swift in Sources */, + 8F9395DB281C0BE000FA612F /* EventsCollectionViewCell.swift in Sources */, + 8F9395D7281C048300FA612F /* LeaguesDetailsViewController.swift in Sources */, 3EB1D36228188EAB004A7ABC /* SplashViewController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/SportsApp.xcodeproj/xcuserdata/aziza.xcuserdatad/xcschemes/xcschememanagement.plist b/SportsApp.xcodeproj/xcuserdata/aziza.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..cb127a6 --- /dev/null +++ b/SportsApp.xcodeproj/xcuserdata/aziza.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + SportsApp.xcscheme_^#shared#^_ + + orderHint + 3 + + + + diff --git a/SportsApp.xcworkspace/xcuserdata/aziza.xcuserdatad/UserInterfaceState.xcuserstate b/SportsApp.xcworkspace/xcuserdata/aziza.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..14c947b Binary files /dev/null and b/SportsApp.xcworkspace/xcuserdata/aziza.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/SportsApp/Model/Events.swift b/SportsApp/Model/Events.swift new file mode 100644 index 0000000..564319b --- /dev/null +++ b/SportsApp/Model/Events.swift @@ -0,0 +1,12 @@ +// +// Events.swift +// SportsApp +// +// Created by Aziza on 29/04/2022. +// + +import UIKit + +class Events: NSObject { + +} diff --git a/SportsApp/Model/Teams.swift b/SportsApp/Model/Teams.swift new file mode 100644 index 0000000..ab617aa --- /dev/null +++ b/SportsApp/Model/Teams.swift @@ -0,0 +1,17 @@ +// +// Teams.swift +// SportsApp +// +// Created by Aziza on 29/04/2022. +// + +import UIKit + +class Teams: NSObject { + + var imageURL : String = "" + var name : String = "" + var ID :Int = 0 + + +} diff --git a/SportsApp/View/Assets.xcassets/Profile.imageset/Contents.json b/SportsApp/View/Assets.xcassets/Profile.imageset/Contents.json new file mode 100644 index 0000000..10d4223 --- /dev/null +++ b/SportsApp/View/Assets.xcassets/Profile.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "uyhbfe1612467038.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SportsApp/View/Assets.xcassets/Profile.imageset/uyhbfe1612467038.png b/SportsApp/View/Assets.xcassets/Profile.imageset/uyhbfe1612467038.png new file mode 100644 index 0000000..4deff9e Binary files /dev/null and b/SportsApp/View/Assets.xcassets/Profile.imageset/uyhbfe1612467038.png differ diff --git a/SportsApp/View/Assets.xcassets/chelsea.imageset/Contents.json b/SportsApp/View/Assets.xcassets/chelsea.imageset/Contents.json new file mode 100644 index 0000000..6c3cdb4 --- /dev/null +++ b/SportsApp/View/Assets.xcassets/chelsea.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "chelsea.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SportsApp/View/Assets.xcassets/chelsea.imageset/chelsea.png b/SportsApp/View/Assets.xcassets/chelsea.imageset/chelsea.png new file mode 100644 index 0000000..76132fc Binary files /dev/null and b/SportsApp/View/Assets.xcassets/chelsea.imageset/chelsea.png differ diff --git a/SportsApp/View/Base.lproj/LaunchScreen.storyboard b/SportsApp/View/Base.lproj/LaunchScreen.storyboard index 865e932..2b4910a 100644 --- a/SportsApp/View/Base.lproj/LaunchScreen.storyboard +++ b/SportsApp/View/Base.lproj/LaunchScreen.storyboard @@ -1,8 +1,10 @@ - - + + + - + + @@ -11,10 +13,10 @@ - + - + @@ -22,4 +24,9 @@ + + + + + diff --git a/SportsApp/View/Base.lproj/Main.storyboard b/SportsApp/View/Base.lproj/Main.storyboard index 138dd66..2abad3b 100644 --- a/SportsApp/View/Base.lproj/Main.storyboard +++ b/SportsApp/View/Base.lproj/Main.storyboard @@ -1,10 +1,11 @@ - + + @@ -69,6 +70,308 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -90,9 +393,16 @@ + + + + + + + diff --git a/SportsApp/View/LeaguesDetailsScreen/EventsCollectionViewCell.swift b/SportsApp/View/LeaguesDetailsScreen/EventsCollectionViewCell.swift new file mode 100644 index 0000000..7401d92 --- /dev/null +++ b/SportsApp/View/LeaguesDetailsScreen/EventsCollectionViewCell.swift @@ -0,0 +1,22 @@ +// +// EventsCollectionViewCell.swift +// SportsApp +// +// Created by Aziza on 29/04/2022. +// + +import UIKit + +class EventsCollectionViewCell: UICollectionViewCell { + + @IBOutlet weak var imgHomeTeam: UIImageView! + + @IBOutlet weak var lableSecTeam: UILabel! + @IBOutlet weak var lablHometeam: UILabel! + @IBOutlet weak var timeLabl: UILabel! + + @IBOutlet weak var imgSecTeam: UIImageView! + @IBOutlet weak var dateLabl: UILabel! + + @IBOutlet weak var eventNameLabl: UILabel! +} diff --git a/SportsApp/View/LeaguesDetailsScreen/LeaguesDetailsViewController.swift b/SportsApp/View/LeaguesDetailsScreen/LeaguesDetailsViewController.swift new file mode 100644 index 0000000..f350663 --- /dev/null +++ b/SportsApp/View/LeaguesDetailsScreen/LeaguesDetailsViewController.swift @@ -0,0 +1,93 @@ +// +// LeaguesDetailsViewController.swift +// SportsApp +// +// Created by Aziza on 29/04/2022. +// + +import UIKit +import SDWebImage +class LeaguesDetailsViewController: UIViewController,UICollectionViewDelegate,UICollectionViewDataSource { + + var teams:[Teams]? + var events:[Events]? + + @IBOutlet weak var addToFavButt: UIButton! + + @IBOutlet weak var eventsCollection: UICollectionView! + + @IBOutlet weak var teamsCollection: UICollectionView! + @IBOutlet weak var resultsCollection: UICollectionView! +//============================================== + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + if collectionView == self.eventsCollection{ + return events?.count ?? 0 + }else if collectionView == self.resultsCollection{ + return events?.count ?? 0 + }else{ + return teams?.count ?? 0 + } + } + //================================================== + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + if collectionView == self.eventsCollection{ + + let cell = eventsCollection.dequeueReusableCell(withReuseIdentifier: "eventsCell", for: indexPath) as! EventsCollectionViewCell + +// cell.eventNameLabl.text=events?[indexPath.row].eventNameLabl ?? "" +// + return cell + + }else if collectionView == self.resultsCollection{ + let cell = resultsCollection.dequeueReusableCell(withReuseIdentifier: "resultCell", for: indexPath) as! ResultsCollectionViewCell + +// cell.eventName.text = eventsArray?[indexPath.row].eventName ?? "" +// + return cell + + }else if collectionView == self.teamsCollection{ + let cell = teamsCollection.dequeueReusableCell(withReuseIdentifier: "teamCell", for: indexPath) as! TeamsCollectionViewCell + + cell.teamName.text=teams?[indexPath.row].name + + cell.teamImg.sd_setImage(with: URL(string: teams![indexPath.row].imageURL), placeholderImage: UIImage(named: "profile")) + +// +// image.layer.borderWidth = 1 +// image.layer.masksToBounds = false +// image.layer.borderColor = UIColor.black.cgColor +// image.layer.cornerRadius = image.frame.height/2 +// image.clipsToBounds = true + + return cell + + + } + return UICollectionViewCell() + } + //================================================ + func numberOfSections(in collectionView: UICollectionView) -> Int { + if collectionView == self.eventsCollection{ + return 1 + }else if collectionView == self.resultsCollection{ + return 3 + }else{ + return 1 + } + } + //================================================== + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + if collectionView == self.teamsCollection{ + //navigate + } + } + //================================================== + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + +} diff --git a/SportsApp/View/LeaguesDetailsScreen/ResultsCollectionViewCell.swift b/SportsApp/View/LeaguesDetailsScreen/ResultsCollectionViewCell.swift new file mode 100644 index 0000000..c9d92f6 --- /dev/null +++ b/SportsApp/View/LeaguesDetailsScreen/ResultsCollectionViewCell.swift @@ -0,0 +1,19 @@ +// +// ResultsCollectionViewCell.swift +// SportsApp +// +// Created by Aziza on 29/04/2022. +// + +import UIKit + +class ResultsCollectionViewCell: UICollectionViewCell { + + @IBOutlet weak var resultTime: UIView! + @IBOutlet weak var resultDate: UIView! + + @IBOutlet weak var score: UILabel! + @IBOutlet weak var secTeam: UILabel! + @IBOutlet weak var homeTeam: UILabel! + +} diff --git a/SportsApp/View/LeaguesDetailsScreen/TeamsCollectionViewCell.swift b/SportsApp/View/LeaguesDetailsScreen/TeamsCollectionViewCell.swift new file mode 100644 index 0000000..403f1d0 --- /dev/null +++ b/SportsApp/View/LeaguesDetailsScreen/TeamsCollectionViewCell.swift @@ -0,0 +1,16 @@ +// +// TeamsCollectionViewCell.swift +// SportsApp +// +// Created by Aziza on 29/04/2022. +// + +import UIKit + +class TeamsCollectionViewCell: UICollectionViewCell { + + @IBOutlet weak var teamImg: UIImageView! + @IBOutlet weak var teamName: UILabel! + + +}