- Completed lingual file

- Completed the default top header set as per the selcection on user, first load will select 0th index
- Completed player for audio books
- Handled error response for audio listing
- AudioBook Details View added like fav
- Fixed the nav bar color issue.
- Finished games module
This commit is contained in:
2024-07-04 19:48:15 +05:30
parent ae1c30eea9
commit 41e770f991
25 changed files with 1858 additions and 141 deletions

View File

@@ -66,6 +66,8 @@
52663FF72BDFACF60001D8CE /* ShadowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52663FF62BDFACF60001D8CE /* ShadowView.swift */; };
52663FF92BDFAF110001D8CE /* EmailVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52663FF82BDFAF110001D8CE /* EmailVM.swift */; };
52663FFB2BDFB1700001D8CE /* TextFieldShadow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52663FFA2BDFB1700001D8CE /* TextFieldShadow.swift */; };
526A436F2C36A97400AE148F /* Games.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 526A436E2C36A97400AE148F /* Games.storyboard */; };
526A43752C36AA4A00AE148F /* GamesListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 526A43742C36AA4A00AE148F /* GamesListVC.swift */; };
5272FCE32BDFDB05000ECB1D /* UserDetailsRegisterVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5272FCE22BDFDB05000ECB1D /* UserDetailsRegisterVC.swift */; };
5272FCE52BDFDC8C000ECB1D /* UserDetailsRegisterVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5272FCE42BDFDC8C000ECB1D /* UserDetailsRegisterVM.swift */; };
527AC6F72C171C8F00434FB7 /* BlogsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 527AC6F52C171C8F00434FB7 /* BlogsCell.swift */; };
@@ -93,6 +95,10 @@
52AC2D252C295A7900337473 /* TeaserDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52AC2D242C295A7900337473 /* TeaserDM.swift */; };
52AC2D272C29791500337473 /* JWPlayerManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52AC2D262C29791500337473 /* JWPlayerManager.swift */; };
52AECA802C08BCB6004A7579 /* PlayerVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52AECA7F2C08BCB6004A7579 /* PlayerVC.swift */; };
52AF71EE2C36AD3100BC5972 /* GamesListVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52AF71ED2C36AD3100BC5972 /* GamesListVM.swift */; };
52AF71F02C36B29A00BC5972 /* GamesListDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52AF71EF2C36B29A00BC5972 /* GamesListDM.swift */; };
52AF71F22C36B77B00BC5972 /* GamesDetailVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52AF71F12C36B77B00BC5972 /* GamesDetailVC.swift */; };
52AF71F42C36C40B00BC5972 /* GamesWebViewVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52AF71F32C36C40B00BC5972 /* GamesWebViewVC.swift */; };
52B8D4D92C04A25E00ED65F3 /* UIViewController+Container.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52B8D4CE2C04A25D00ED65F3 /* UIViewController+Container.swift */; };
52B8D4DA2C04A25E00ED65F3 /* Preferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52B8D4CF2C04A25D00ED65F3 /* Preferences.swift */; };
52B8D4DB2C04A25E00ED65F3 /* TransitionContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52B8D4D02C04A25D00ED65F3 /* TransitionContext.swift */; };
@@ -330,6 +336,8 @@
52663FF62BDFACF60001D8CE /* ShadowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShadowView.swift; sourceTree = "<group>"; };
52663FF82BDFAF110001D8CE /* EmailVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmailVM.swift; sourceTree = "<group>"; };
52663FFA2BDFB1700001D8CE /* TextFieldShadow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextFieldShadow.swift; sourceTree = "<group>"; };
526A436E2C36A97400AE148F /* Games.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Games.storyboard; sourceTree = "<group>"; };
526A43742C36AA4A00AE148F /* GamesListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GamesListVC.swift; sourceTree = "<group>"; };
5272FCE22BDFDB05000ECB1D /* UserDetailsRegisterVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDetailsRegisterVC.swift; sourceTree = "<group>"; };
5272FCE42BDFDC8C000ECB1D /* UserDetailsRegisterVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDetailsRegisterVM.swift; sourceTree = "<group>"; };
527AC6F52C171C8F00434FB7 /* BlogsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlogsCell.swift; sourceTree = "<group>"; };
@@ -357,6 +365,10 @@
52AC2D242C295A7900337473 /* TeaserDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TeaserDM.swift; sourceTree = "<group>"; };
52AC2D262C29791500337473 /* JWPlayerManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JWPlayerManager.swift; sourceTree = "<group>"; };
52AECA7F2C08BCB6004A7579 /* PlayerVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerVC.swift; sourceTree = "<group>"; };
52AF71ED2C36AD3100BC5972 /* GamesListVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GamesListVM.swift; sourceTree = "<group>"; };
52AF71EF2C36B29A00BC5972 /* GamesListDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GamesListDM.swift; sourceTree = "<group>"; };
52AF71F12C36B77B00BC5972 /* GamesDetailVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GamesDetailVC.swift; sourceTree = "<group>"; };
52AF71F32C36C40B00BC5972 /* GamesWebViewVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GamesWebViewVC.swift; sourceTree = "<group>"; };
52B8D4CE2C04A25D00ED65F3 /* UIViewController+Container.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIViewController+Container.swift"; sourceTree = "<group>"; };
52B8D4CF2C04A25D00ED65F3 /* Preferences.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Preferences.swift; sourceTree = "<group>"; };
52B8D4D02C04A25D00ED65F3 /* TransitionContext.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransitionContext.swift; sourceTree = "<group>"; };
@@ -646,6 +658,7 @@
523ED25C2BDA2BC700CFED02 /* WOKA */ = {
isa = PBXGroup;
children = (
526A436D2C36A96A00AE148F /* Games */,
52BFB52B2C33DA9700BAAE15 /* Audio Books */,
52DAC6462C21761700E2F85B /* WebSeries */,
9C834ED92C1C20EC00B29A9C /* WOKA.entitlements */,
@@ -877,6 +890,51 @@
path = Alerts;
sourceTree = "<group>";
};
526A436D2C36A96A00AE148F /* Games */ = {
isa = PBXGroup;
children = (
526A43732C36A98000AE148F /* Model */,
526A43722C36A97E00AE148F /* View */,
526A43712C36A97B00AE148F /* ViewModel */,
526A43702C36A97800AE148F /* Controller */,
526A436E2C36A97400AE148F /* Games.storyboard */,
);
path = Games;
sourceTree = "<group>";
};
526A43702C36A97800AE148F /* Controller */ = {
isa = PBXGroup;
children = (
526A43742C36AA4A00AE148F /* GamesListVC.swift */,
52AF71F12C36B77B00BC5972 /* GamesDetailVC.swift */,
52AF71F32C36C40B00BC5972 /* GamesWebViewVC.swift */,
);
path = Controller;
sourceTree = "<group>";
};
526A43712C36A97B00AE148F /* ViewModel */ = {
isa = PBXGroup;
children = (
52AF71ED2C36AD3100BC5972 /* GamesListVM.swift */,
);
path = ViewModel;
sourceTree = "<group>";
};
526A43722C36A97E00AE148F /* View */ = {
isa = PBXGroup;
children = (
);
path = View;
sourceTree = "<group>";
};
526A43732C36A98000AE148F /* Model */ = {
isa = PBXGroup;
children = (
52AF71EF2C36B29A00BC5972 /* GamesListDM.swift */,
);
path = Model;
sourceTree = "<group>";
};
527AC6FF2C182D1700434FB7 /* Timer */ = {
isa = PBXGroup;
children = (
@@ -1482,6 +1540,7 @@
527AC6F82C171C8F00434FB7 /* BlogsCell.xib in Resources */,
52A981D82C1B0E27000E0BEC /* FavouriteCell.xib in Resources */,
52C1A4E82C05C95D007BAA50 /* Theme.storyboard in Resources */,
526A436F2C36A97400AE148F /* Games.storyboard in Resources */,
522D65652C1ACE9C0021E505 /* UserNotificationCell.xib in Resources */,
9C535DC52C00BF2400DA6DCD /* HomeExploreCell.xib in Resources */,
9CBE1B422C0F37B300CA6E61 /* DropDownCell.xib in Resources */,
@@ -1625,9 +1684,11 @@
5202AB012BDFA7900043B7BD /* EmailValidation.swift in Sources */,
52D6A24E2C22B3AB00145908 /* WebSeriesShowListDM.swift in Sources */,
52B8D4E12C04A25E00ED65F3 /* BasicTransitionAnimator.swift in Sources */,
52AF71F02C36B29A00BC5972 /* GamesListDM.swift in Sources */,
52BC3BF02C1701F8002FACA6 /* BlogDM.swift in Sources */,
525954192BE8CC3400191286 /* ConstantString.swift in Sources */,
52D774EB2BDFC0BF001D87DE /* OTPVC.swift in Sources */,
52AF71F42C36C40B00BC5972 /* GamesWebViewVC.swift in Sources */,
9C007F202C255DF200F798C2 /* SeasonEpisodeListingDM.swift in Sources */,
52D2F3D82C24043D009E52FF /* ShimmerEffectView.swift in Sources */,
9C27E16F2BDB866500EC1DA9 /* CellIdentifier.swift in Sources */,
@@ -1675,6 +1736,7 @@
9CBCB2AA2BE51A52007D7934 /* ThemeOneVC.swift in Sources */,
52D774E92BDFBDA4001D87DE /* AuthenticationStringConstant.swift in Sources */,
5259541B2BE8D6F900191286 /* NetworkReachibility.swift in Sources */,
52AF71EE2C36AD3100BC5972 /* GamesListVM.swift in Sources */,
52A981CE2C1AFE66000E0BEC /* FavouriteListingDM.swift in Sources */,
527AC6FD2C173A5100434FB7 /* SongListCell.swift in Sources */,
52D6A2542C22B93F00145908 /* CategoryListingDM.swift in Sources */,
@@ -1686,6 +1748,7 @@
525954292BEA079500191286 /* UserEmailVerifyDM.swift in Sources */,
522D655E2C1ACCF40021E505 /* UserNotificationDM.swift in Sources */,
9C1C69FC2C106C240035B2C7 /* ContactSupportVM.swift in Sources */,
52AF71F22C36B77B00BC5972 /* GamesDetailVC.swift in Sources */,
52A3F6AF2BECC0690000BB0B /* LinkedChildVM.swift in Sources */,
52C8EC7D2C3536E5002DC35C /* ContinueAudioCell.swift in Sources */,
525954252BE8F01600191286 /* ValueWrapper.swift in Sources */,
@@ -1705,6 +1768,7 @@
9C56E8482BDBEFAB00E4CA14 /* AssetColor.swift in Sources */,
52BFB5372C33E0C500BAAE15 /* AudioBookHomeVM.swift in Sources */,
9C0A85432BEE3EC90093783D /* NewPasswordVM.swift in Sources */,
526A43752C36AA4A00AE148F /* GamesListVC.swift in Sources */,
522D65662C1ACE9C0021E505 /* UserNotificationCell.swift in Sources */,
524C42332C049D590016A11C /* CustomizableSegmentControl.swift in Sources */,
9C535DB52C005A6D00DA6DCD /* KeyWindowFix.swift in Sources */,

View File

@@ -7,14 +7,27 @@
import UIKit
protocol ReloadAudioBooksFavLike{
func updateRows(id : Int, type : FavCellCLick, isFav : Bool? , isLike : Bool? )
}
class AudioBookDetailsVC : UIViewController{
@IBOutlet weak var watchingImage: UIImageView!
@IBOutlet weak var watchingTitle: UILabel!
@IBOutlet weak var watchingDesc: UITextView!
// Completion block to be executed when the alert is dismissed
var onDoneBlock: (() -> Void)?
@IBOutlet weak var addIcon: UIImageView!
@IBOutlet weak var addLabel: UILabel!
@IBOutlet weak var likeIcon: UIImageView!
@IBOutlet weak var likeLabel: UILabel!
@IBOutlet weak var totalLikes: UILabel!
@IBOutlet weak var addView: UIView!
@IBOutlet weak var shareView: UIView!
@IBOutlet weak var likeView: UIView!
var delegate : ReloadAudioBooksFavLike?
var audioData : ListenAudioListingDM.AudioDatum?
@@ -22,12 +35,139 @@ class AudioBookDetailsVC : UIViewController{
override func viewDidLoad() {
super.viewDidLoad()
initView()
self.view.addTapGesture {
self.dismiss(animated: true)
}
tapHandler()
}
func tapHandler(){
addView.addTapGesture { [weak self] in
guard let self else{return}
if let audioData{
guard let showID = audioData.id, let isFav = audioData.markAsFavourite, let postType = audioData.contentMoreDetails?.first?.postType else{return}
if isFav {
LikeFavCommonFunc.shareInstance.removeFavourite(postID: showID, postType: postType, categoryID: 0, vc: self) { isDone in
self.audioData?.markAsFavourite = false
K.GVar.reloadMyList = true
self.delegate?.updateRows(id: showID, type: .favourite, isFav: false, isLike: nil)
self.initView()
}
}else{
LikeFavCommonFunc.shareInstance.addFavourite(postID: showID, postType: postType, categoryID: 0, vc: self) { isDone in
self.audioData?.markAsFavourite = true
K.GVar.reloadMyList = true
self.delegate?.updateRows(id: showID, type: .favourite, isFav: true, isLike: nil)
self.initView()
}
}
}
if let continueAudioData{
guard let showID = continueAudioData.id, let isFav = continueAudioData.markAsFavourite, let postType = continueAudioData.contentMoreDetails?.first?.postType else{return}
if isFav {
LikeFavCommonFunc.shareInstance.removeFavourite(postID: showID, postType: postType, categoryID: 0, vc: self) { isDone in
self.continueAudioData?.markAsFavourite = false
K.GVar.reloadMyList = true
self.delegate?.updateRows(id: showID, type: .favourite, isFav: false, isLike: nil)
self.initView()
}
}else{
LikeFavCommonFunc.shareInstance.addFavourite(postID: showID, postType: postType, categoryID: 0, vc: self) { isDone in
self.continueAudioData?.markAsFavourite = true
K.GVar.reloadMyList = true
self.delegate?.updateRows(id: showID, type: .favourite, isFav: true, isLike: nil)
self.initView()
}
}
}
}
likeView.addTapGesture { [weak self] in
guard let self else{return}
if let audioData{
guard let showID = audioData.id, let isLiked = audioData.isLiked, let postType = audioData.contentMoreDetails?.first?.postType else{return}
if isLiked{
LikeFavCommonFunc.shareInstance.unlikePost(postID: showID, postType: postType, vc: self) { isDone in
self.audioData?.isLiked = false
K.GVar.reloadMyList = true
self.delegate?.updateRows(id: showID, type: .liked, isFav: nil, isLike: false)
self.initView()
}
}else{
LikeFavCommonFunc.shareInstance.likePost(postID: showID, postType: postType, vc: self) { isDone in
self.audioData?.isLiked = true
K.GVar.reloadMyList = true
self.delegate?.updateRows(id: showID, type: .liked, isFav: nil, isLike: true)
self.initView()
}
}
}
if let continueAudioData{
guard let showID = continueAudioData.id, let isLiked = continueAudioData.isLiked, let postType = continueAudioData.contentMoreDetails?.first?.postType else{return}
if isLiked{
LikeFavCommonFunc.shareInstance.unlikePost(postID: showID, postType: postType, vc: self) { isDone in
self.continueAudioData?.isLiked = false
K.GVar.reloadMyList = true
self.delegate?.updateRows(id: showID, type: .liked, isFav: nil, isLike: false)
self.initView()
}
}else{
LikeFavCommonFunc.shareInstance.likePost(postID: showID, postType: postType, vc: self) { isDone in
self.continueAudioData?.isLiked = true
K.GVar.reloadMyList = true
self.delegate?.updateRows(id: showID, type: .liked, isFav: nil, isLike: true)
self.initView()
}
}
}
}
shareView.addTapGesture {
print("share")
}
}
func initView(){
if let audioData{
if let url = audioData.thumbnailPath{
watchingImage.imageURL(url, color: .white)
}
totalLikes.text = audioData.likesCount?.toString() ?? "0"
if let like = audioData.isLiked{
switch like{
case true:
likeIcon.image = UIImage(systemName: "hand.thumbsup.fill")
likeLabel.text = "LIKED".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
case false:
likeIcon.image = UIImage(systemName: "hand.thumbsup")
likeLabel.text = "LIKE".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
}
}
if let favourite = audioData.markAsFavourite{
if favourite == true{
addIcon.image = UIImage(systemName: "heart.fill")
addLabel.text = "ADDED".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
}else{
addIcon.image = UIImage(systemName: "heart")
addLabel.text = "ADD".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
}
}
if AuthFunc.shareInstance.getDefaultLanguage() == .english{
if let englishData = audioData.contentMoreDetails?.filter({$0.languageMasterID == 1}).first{
watchingTitle.text = englishData.title
@@ -54,26 +194,83 @@ class AudioBookDetailsVC : UIViewController{
watchingImage.imageURL(url, color: .white)
}
totalLikes.text = continueAudioData.likesCount?.toString() ?? "0"
if let like = continueAudioData.isLiked{
switch like{
case true:
likeIcon.image = UIImage(systemName: "hand.thumbsup.fill")
likeLabel.text = "LIKED".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
case false:
likeIcon.image = UIImage(systemName: "hand.thumbsup")
likeLabel.text = "LIKE".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
}
}
if let favourite = continueAudioData.markAsFavourite{
if favourite == true{
addIcon.image = UIImage(systemName: "heart.fill")
addLabel.text = "ADDED".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
}else{
addIcon.image = UIImage(systemName: "heart")
addLabel.text = "ADD".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
}
}
if AuthFunc.shareInstance.getDefaultLanguage() == .english{
if let englishData = continueAudioData.contentMoreDetails?.filter({$0.languageMasterID == 1}).first{
watchingTitle.text = englishData.title
if let desc = englishData.description?.replacingOccurrences(of: "<br>", with: "").htmlToAttributedString{
let sizeText = NSMutableAttributedString(attributedString: desc)
sizeText.setFontFace(font: FontCustom.shareInstance.customFont(fontName: .Exo2_Regular, size: 15),color: UIColor.appColor(.TextDarkBlue)!)
self.watchingDesc.attributedText = sizeText
}
}
}else{
if let hindiData = continueAudioData.contentMoreDetails?.filter({$0.languageMasterID == 2}).first{
watchingTitle.text = hindiData.title
if let desc = hindiData.description?.replacingOccurrences(of: "<br>", with: "").htmlToAttributedString{
let sizeText = NSMutableAttributedString(attributedString: desc)
sizeText.setFontFace(font: FontCustom.shareInstance.customFont(fontName: .Exo2_Regular, size: 15),color: UIColor.appColor(.TextDarkBlue)!)
self.watchingDesc.attributedText = sizeText
}
}
}
}
}
@IBAction func watchBtnTapped(_ sender: LocalisedElementsButton) {
var playerItems = [JwPlayerItemCreate]()
if let audioData{
if AuthFunc.shareInstance.getDefaultLanguage() == .english{
if let englishData = audioData.contentMoreDetails?.filter({$0.languageMasterID == 1}).first, let url = englishData.url{
playerItems.append(JwPlayerItemCreate(url: url, poster: audioData.thumbnailPath, titles: englishData.title))
}
}else{
if let hindiData = audioData.contentMoreDetails?.filter({$0.languageMasterID == 2}).first, let url = hindiData.url{
playerItems.append(JwPlayerItemCreate(url: url, poster: audioData.thumbnailPath, titles: hindiData.title))
}
}
}
if let continueAudioData{
if AuthFunc.shareInstance.getDefaultLanguage() == .english{
if let englishData = continueAudioData.contentMoreDetails?.filter({$0.languageMasterID == 1}).first, let url = englishData.url{
playerItems.append(JwPlayerItemCreate(url: url, poster: continueAudioData.thumbnailPath, titles: englishData.title))
}
}else{
if let hindiData = continueAudioData.contentMoreDetails?.filter({$0.languageMasterID == 2}).first, let url = hindiData.url{
playerItems.append(JwPlayerItemCreate(url: url, poster: continueAudioData.thumbnailPath, titles: hindiData.title))
}
}
}
JWPlayerManager.shared.presentPlayer(from: self, playerItems: playerItems, startIndex: 0, contentType: .audioBooks)
}
@IBAction func watchBtnTapped(_ sender: LocalisedElementsButton) {
}
@IBAction func closeBtnTapped(_ sender: LocalisedElementsButton) {
@IBAction func closeBtnTapped(_ sender: UIButton) {
self.dismiss(animated: true) {
}
}
}

View File

@@ -27,18 +27,18 @@ class AudioBookHomeVC: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
vm.vc = self
self.title = "AUDIO BOOKS"
self.title = "AUDIO BOOKS".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
vm.initView()
scrollView.delegate = self
let color1 = #colorLiteral(red: 0, green: 0.4784313725, blue: 0.7529411765, alpha: 1)
let color2 = #colorLiteral(red: 0, green: 0.7529411765, blue: 0.7529411765, alpha: 1)
self.navigationController?.navigationBar.setGradientBackground(colors: [color1, color2], startPoint: .left, endPoint: .right)
self.view.applyGradient(colors: [color1,color2], startPoint: .Point.left.point , endPoint: .Point.right.point)
navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
navigationController?.navigationBar.shadowImage = UIImage()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.setNavigationBarHidden(false, animated: animated)
@@ -61,6 +61,54 @@ class AudioBookHomeVC: UIViewController {
override func viewDidLayoutSubviews() {
vm.updateTableHeight()
}
@IBAction func listenAudioBtnTapped(_ sender: LocalisedElementsButton) {
let data = vm.audioListData[vm.indexToLoad]
var playerItems = [JwPlayerItemCreate]()
if AuthFunc.shareInstance.getDefaultLanguage() == .english{
if let englishData = data.contentMoreDetails?.filter({$0.languageMasterID == 1}).first, let url = englishData.url{
playerItems.append(JwPlayerItemCreate(url: url, poster: data.thumbnailPath, titles: englishData.title))
}
}else{
if let hindiData = data.contentMoreDetails?.filter({$0.languageMasterID == 2}).first, let url = hindiData.url{
playerItems.append(JwPlayerItemCreate(url: url, poster: data.thumbnailPath, titles: hindiData.title))
}
}
JWPlayerManager.shared.presentPlayer(from: self, playerItems: playerItems, startIndex: 0, contentType: .audioBooks)
}
}
// MARK: - Delegate for reload
extension AudioBookHomeVC : ReloadAudioBooksFavLike{
func updateRows(id: Int, type: FavCellCLick, isFav: Bool?, isLike: Bool?) {
if let isFav{
if let continueDataIndex = vm.continueWatchingData.firstIndex(where:{$0.id == id}) {
vm.continueWatchingData[continueDataIndex].markAsFavourite = isFav
continueWatchingCV.reloadItems(at: [IndexPath(row: continueDataIndex, section: 0)])
}
if let audioListDataIndex = vm.audioListData.firstIndex(where:{$0.id == id}) {
vm.audioListData[audioListDataIndex].markAsFavourite = isFav
audioListingTableView.reloadRows(at: [IndexPath(row: audioListDataIndex, section: 0)],with: .none)
K.GVar.reloadMyList = true
}
}
if let isLike{
if let continueDataIndex = vm.continueWatchingData.firstIndex(where:{$0.id == id}) {
vm.continueWatchingData[continueDataIndex].isLiked = isLike
continueWatchingCV.reloadItems(at: [IndexPath(row: continueDataIndex, section: 0)])
}
if let audioListDataIndex = vm.audioListData.firstIndex(where:{$0.id == id}) {
vm.audioListData[audioListDataIndex].isLiked = isLike
audioListingTableView.reloadRows(at: [IndexPath(row: audioListDataIndex, section: 0)],with: .none)
K.GVar.reloadMyList = true
}
}
}
}
// MARK: - TableView DataSource , Delegates
@@ -89,56 +137,6 @@ extension AudioBookHomeVC : TableViewSRC{
return cell
}
func updateFavLikes(type : FavCellCLick, index : Int){
// let data = vm.audioListData[index]
// switch type {
// case .favourite:
// guard let isFav = data.markAsFavourite ,let postID = data.id,let postType = data.contentMoreDetails?.first?.postType else{return}
// if let categoryIds = data.favouriteCategoryIDS?.rawValue {
// let components = categoryIds.components(separatedBy: ",")
// if isFav == true && (components.first == categoryID.toString() || components.last == categoryID.toString()){
// LikeFavCommonFunc.shareInstance.removeFavourite(postID: postID, postType: postType, categoryID: categoryID, vc: self) { [unowned self] isDone in
// if isDone{
// vm.showData[index].markAsFavourite = false
// vm.showData[index].favouriteCategoryIDS = ValueWrapper.stringValue("")
// showListingTableView.reloadRows(at: [IndexPath(row: index, section: 0)],with: .none)
// K.GVar.reloadMyList = true
// }
// }
// }else{
// LikeFavCommonFunc.shareInstance.addFavourite(postID: postID, postType: postType, categoryID: categoryID, vc: self) { [unowned self] isDone in
// if isDone{
// vm.showData[index].markAsFavourite = true
// vm.showData[index].favouriteCategoryIDS = ValueWrapper.stringValue(categoryID.toString())
// showListingTableView.reloadRows(at: [IndexPath(row: index, section: 0)],with: .none)
// K.GVar.reloadMyList = true
// }
// }
// }
// return
// }
// case .liked:
// guard let isLiked = data.isLiked ,let postID = data.id,let postType = data.contentMoreDetails?.first?.postType else{return}
// if isLiked{
// LikeFavCommonFunc.shareInstance.unlikePost(postID: postID, postType: postType, vc: self) { [unowned self] isDone in
// if isDone{
// vm.showData[index].isLiked = false
// vm.showData[index].likesCount! -= 1
// showListingTableView.reloadRows(at: [IndexPath(row: index, section: 0)],with: .none)
// }
// }
// }else{
// LikeFavCommonFunc.shareInstance.likePost(postID: postID, postType: postType, vc: self){ [unowned self] isDone in
// if isDone{
// vm.showData[index].isLiked = true
// vm.showData[index].likesCount! += 1
// showListingTableView.reloadRows(at: [IndexPath(row: index, section: 0)],with: .none)
// }
// }
// }
// }
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
/*
Updated the top header data
@@ -153,20 +151,8 @@ extension AudioBookHomeVC : TableViewSRC{
vcPush.modalPresentationStyle = .overCurrentContext
vcPush.modalTransitionStyle = .crossDissolve
vcPush.audioData = data
vcPush.delegate = self
self.present(vcPush, animated: true)
// if vm.showData.count == 0 {return}
// let showData = vm.showData[indexPath.row]
//
// let sb = UIStoryboard(name: K.StoryBoard.webSeries, bundle: nil)
// let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.WebSeries.webSeriesSeasonVC) as! WebSeriesSeasonVC
// vcPush.vm.showData = showData
// vcPush.vm.indexSelected = indexPath.row
// vcPush.likeFavDelegate = self
// if let selectedIndex = vm.dropDownModule.indexForSelectedRow{
// let categoryID = vm.categoryListingData[selectedIndex]
// vcPush.vm.categoryID = categoryID.id
// }
// self.navigationController?.pushViewController(vcPush, animated: true)
}
}
@@ -192,24 +178,18 @@ extension AudioBookHomeVC : CollectionViewSRC{
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
let data = vm.continueWatchingData[indexPath.row]
if let audioListIndex = vm.audioListData.firstIndex(where:{$0.id == data.id}){
vm.indexToLoad = audioListIndex
vm.setInitialData()
}
let sb = UIStoryboard(name: K.StoryBoard.audioBooks, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.AudioBooks.audioBookDetailsVC) as! AudioBookDetailsVC
vcPush.modalPresentationStyle = .overCurrentContext
vcPush.modalTransitionStyle = .crossDissolve
vcPush.continueAudioData = data
vcPush.delegate = self
self.present(vcPush, animated: true)
// let data = vm.continueWatchingData[indexPath.row]
//
// let sb = UIStoryboard(name: K.StoryBoard.webSeries, bundle: nil)
// let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.WebSeries.continueWatchingVC) as! ContinueWatchingVC
// vcPush.modalPresentationStyle = .overCurrentContext
// vcPush.modalTransitionStyle = .crossDissolve
// vcPush.watchData = data
// if let selectedIndex = vm.dropDownModule.indexForSelectedRow{
// let categoryID = vm.categoryListingData[selectedIndex]
// vcPush.categoryID = categoryID.id
// }
// self.present(vcPush, animated: true)
}
@@ -353,3 +333,25 @@ extension UINavigationBar {
}
}
}
extension CGPoint{
enum Point {
case topRight, topLeft
case bottomRight, bottomLeft
case left , right
case custom(point: CGPoint)
var point: CGPoint {
switch self {
case .topRight: return CGPoint(x: 1, y: 0)
case .topLeft: return CGPoint(x: 0, y: 0)
case .bottomRight: return CGPoint(x: 1, y: 1)
case .bottomLeft: return CGPoint(x: 0, y: 1)
case .left : return CGPoint(x: 0, y: 0)
case .right : return CGPoint(x: 0.8, y: 0)
case .custom(let point): return point
}
}
}
}

View File

@@ -34,9 +34,9 @@ class AudioBookHomeVM{
}
func setInitialData(){
if indexToLoad > continueWatchingData.count {
return
}
// if indexToLoad > continueWatchingData.count {
// return
// }
let data = audioListData[indexToLoad]
if let url = data.thumbnailPath{
@@ -146,7 +146,12 @@ class AudioBookHomeVM{
return
}
Utilities.dismissProgressHUD()
vc.toast(msg: error.localizedDescription , time: 2)
Utilities.alertWithBtnCompletion(title: "Error", msgBody: error.localizedDescription, okBtnStr: "Retry?", vc: self.vc) { isDone in
if isDone{
self.getShowListing()
}
}
// vc.toast(msg: error.localizedDescription , time: 2)
}
}
}

View File

@@ -13,6 +13,9 @@
<array key="Exo2-Bold.ttf">
<string>Exo2-Bold</string>
</array>
<array key="Exo2-Regular.ttf">
<string>Exo2-Regular</string>
</array>
</customFonts>
<scenes>
<!--Audio Book HomeVC-->
@@ -76,6 +79,9 @@
<integer key="value" value="25"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="listenAudioBtnTapped:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="Cn8-eU-nJs"/>
</connections>
</button>
</subviews>
</stackView>
@@ -225,7 +231,7 @@
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="CloseIconEmpty"/>
<connections>
<action selector="closeBtnTapped:" destination="ICQ-u9-dRh" eventType="touchUpInside" id="mmq-Ta-fhz"/>
<action selector="closeBtnTapped:" destination="ICQ-u9-dRh" eventType="touchUpInside" id="ohD-aX-eKM"/>
</connections>
</button>
</subviews>
@@ -266,18 +272,33 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="DwM-gS-hYv">
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="DwM-gS-hYv">
<rect key="frame" x="13" y="215.00000000000003" width="367" height="21.666666666666657"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="dasdasdas" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wpV-6L-2b1">
<rect key="frame" x="0.0" y="0.0" width="367" height="21.666666666666668"/>
<rect key="frame" x="0.0" y="0.0" width="92" height="21.666666666666668"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
<color key="textColor" name="TextDarkBlue"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" spacing="4" translatesAutoresizingMaskIntoConstraints="NO" id="UXp-vU-pIb">
<rect key="frame" x="334.66666666666669" y="0.0" width="32.333333333333314" height="21.666666666666668"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="hand.thumbsup.fill" catalog="system" translatesAutoresizingMaskIntoConstraints="NO" id="ZPL-vL-1Yv">
<rect key="frame" x="0.0" y="0.66666666666666607" width="20" height="20.333333333333336"/>
<color key="tintColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PZ4-mv-7WT">
<rect key="frame" x="24" y="0.0" width="8.3333333333333357" height="21.666666666666668"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
</stackView>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="45x-AZ-MpL">
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="45x-AZ-MpL">
<rect key="frame" x="13" y="246.66666666666663" width="367" height="180"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
@@ -288,7 +309,7 @@
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" translatesAutoresizingMaskIntoConstraints="NO" id="6CI-TN-uVE">
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" translatesAutoresizingMaskIntoConstraints="NO" id="6CI-TN-uVE">
<rect key="frame" x="13" y="436.66666666666674" width="367" height="50"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="tailTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pUm-hG-y9f" customClass="LocalisedElementsButton" customModule="WOKA" customModuleProvider="target">
@@ -311,9 +332,132 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="watchBtnTapped:" destination="ICQ-u9-dRh" eventType="touchUpInside" id="DEQ-Yu-mPB"/>
<action selector="watchBtnTapped:" destination="ICQ-u9-dRh" eventType="touchUpInside" id="xEt-sn-sBb"/>
</connections>
</button>
<stackView opaque="NO" contentMode="scaleToFill" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="Cqi-WP-4E5">
<rect key="frame" x="213.33333333333337" y="0.0" width="153.66666666666663" height="50"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zzP-3H-SbJ">
<rect key="frame" x="0.0" y="0.0" width="40" height="50"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="F5J-gV-gV8">
<rect key="frame" x="0.0" y="0.0" width="40" height="50"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" image="heart" catalog="system" translatesAutoresizingMaskIntoConstraints="NO" id="2yk-zl-Q9j">
<rect key="frame" x="5" y="2" width="30" height="33"/>
<color key="tintColor" name="ImageDarkBlue"/>
<constraints>
<constraint firstAttribute="width" constant="30" id="KJl-5o-bOl"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ADDED" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LQ3-mK-dvo" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="1" y="36" width="38.333333333333336" height="14"/>
<constraints>
<constraint firstAttribute="height" constant="14" id="cdP-6Q-hp8"/>
</constraints>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="12"/>
<color key="textColor" name="ImageDarkBlue"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="F5J-gV-gV8" secondAttribute="bottom" id="1iX-ea-UF9"/>
<constraint firstItem="F5J-gV-gV8" firstAttribute="top" secondItem="zzP-3H-SbJ" secondAttribute="top" id="A4Z-GP-81N"/>
<constraint firstAttribute="width" constant="40" id="Py3-i2-WDG"/>
<constraint firstItem="F5J-gV-gV8" firstAttribute="leading" secondItem="zzP-3H-SbJ" secondAttribute="leading" id="ZKd-yy-O02"/>
<constraint firstAttribute="trailing" secondItem="F5J-gV-gV8" secondAttribute="trailing" id="fkN-cA-gzq"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="o9S-fJ-IZG" userLabel="Seperator">
<rect key="frame" x="47.999999999999972" y="0.0" width="1" height="50"/>
<color key="backgroundColor" name="TextDarkBlue"/>
<constraints>
<constraint firstAttribute="width" constant="0.80000000000000004" id="Yfb-OX-g9K"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JnW-oE-1M6">
<rect key="frame" x="56.999999999999972" y="0.0" width="40" height="50"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="uPF-iw-5Xh">
<rect key="frame" x="0.0" y="0.0" width="40" height="50"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" image="ShareImage" translatesAutoresizingMaskIntoConstraints="NO" id="YB7-WI-GyE">
<rect key="frame" x="10" y="0.0" width="20" height="36"/>
<color key="tintColor" name="ImageDarkBlue"/>
<constraints>
<constraint firstAttribute="width" constant="20" id="ZMn-Z9-2nZ"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SHARE" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="j9H-at-bpq" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="1.6666666666666856" y="36" width="36.666666666666664" height="14"/>
<constraints>
<constraint firstAttribute="height" constant="14" id="fZt-pP-cQI"/>
</constraints>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="12"/>
<color key="textColor" name="ImageDarkBlue"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstAttribute="width" constant="40" id="gls-Pj-I5j"/>
</constraints>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="uPF-iw-5Xh" secondAttribute="trailing" id="3ku-pJ-S5q"/>
<constraint firstItem="uPF-iw-5Xh" firstAttribute="top" secondItem="JnW-oE-1M6" secondAttribute="top" id="DGC-b5-Y0z"/>
<constraint firstItem="uPF-iw-5Xh" firstAttribute="leading" secondItem="JnW-oE-1M6" secondAttribute="leading" id="UwQ-pP-lip"/>
<constraint firstAttribute="bottom" secondItem="uPF-iw-5Xh" secondAttribute="bottom" id="ng5-gA-9vy"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OQH-KM-9TM" userLabel="Seperator">
<rect key="frame" x="104.99999999999997" y="0.0" width="0.6666666666666714" height="50"/>
<color key="backgroundColor" name="TextDarkBlue"/>
<constraints>
<constraint firstAttribute="width" constant="0.80000000000000004" id="XXD-Xl-0qZ"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cDf-0R-9gk">
<rect key="frame" x="113.66666666666666" y="0.0" width="40" height="50"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="3mk-AO-FQN">
<rect key="frame" x="0.0" y="0.0" width="40" height="50"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" image="hand.thumbsup" catalog="system" translatesAutoresizingMaskIntoConstraints="NO" id="BFc-Fk-JaV">
<rect key="frame" x="7.6666666666666856" y="-0.33333333333333215" width="25" height="36"/>
<color key="tintColor" name="ImageDarkBlue"/>
<constraints>
<constraint firstAttribute="width" constant="25" id="4rU-FT-qPU"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="LIKE" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YWt-as-0Xx" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="8.3333333333333126" y="36" width="23.333333333333329" height="14"/>
<constraints>
<constraint firstAttribute="height" constant="14" id="vdT-u9-oX9"/>
</constraints>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="12"/>
<color key="textColor" name="ImageDarkBlue"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="3mk-AO-FQN" firstAttribute="leading" secondItem="cDf-0R-9gk" secondAttribute="leading" id="2e2-Qu-bRn"/>
<constraint firstItem="3mk-AO-FQN" firstAttribute="top" secondItem="cDf-0R-9gk" secondAttribute="top" id="ViF-bb-IfB"/>
<constraint firstAttribute="bottom" secondItem="3mk-AO-FQN" secondAttribute="bottom" id="X9h-U6-7s0"/>
<constraint firstAttribute="trailing" secondItem="3mk-AO-FQN" secondAttribute="trailing" id="fTw-Zz-bbl"/>
<constraint firstAttribute="width" constant="40" id="pXR-wP-BU7"/>
</constraints>
</view>
</subviews>
</stackView>
</subviews>
<constraints>
<constraint firstAttribute="height" constant="50" id="U9c-Kh-sHB"/>
@@ -357,6 +501,14 @@
</constraints>
</view>
<connections>
<outlet property="addIcon" destination="2yk-zl-Q9j" id="Hzs-4j-JMo"/>
<outlet property="addLabel" destination="LQ3-mK-dvo" id="4in-Gm-TnD"/>
<outlet property="addView" destination="zzP-3H-SbJ" id="4cf-XU-HCu"/>
<outlet property="likeIcon" destination="BFc-Fk-JaV" id="KAL-RG-C03"/>
<outlet property="likeLabel" destination="YWt-as-0Xx" id="Cad-AG-bQa"/>
<outlet property="likeView" destination="cDf-0R-9gk" id="RkQ-Vv-Cdh"/>
<outlet property="shareView" destination="JnW-oE-1M6" id="Cf0-US-B2t"/>
<outlet property="totalLikes" destination="PZ4-mv-7WT" id="YzN-4f-ePX"/>
<outlet property="watchingDesc" destination="45x-AZ-MpL" id="HFF-fb-klz"/>
<outlet property="watchingImage" destination="ftG-0h-VUV" id="vdu-Rx-0sc"/>
<outlet property="watchingTitle" destination="wpV-6L-2b1" id="yb9-BK-g6K"/>
@@ -370,7 +522,14 @@
<resources>
<image name="CloseIconEmpty" width="30" height="30"/>
<image name="PlayButtonSmall" width="28.333333969116211" height="28.333333969116211"/>
<image name="ShareImage" width="18" height="18"/>
<image name="WebSeriesSeasonsBackground" width="142.66667175292969" height="187.33332824707031"/>
<image name="hand.thumbsup" catalog="system" width="123" height="128"/>
<image name="hand.thumbsup.fill" catalog="system" width="128" height="121"/>
<image name="heart" catalog="system" width="128" height="107"/>
<namedColor name="ImageDarkBlue">
<color red="0.035000000149011612" green="0.0" blue="0.36500000953674316" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="TextDarkBlue">
<color red="0.10599999874830246" green="0.050999999046325684" blue="0.60399997234344482" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>

View File

@@ -18,5 +18,6 @@ extension K{
static let sideBarNav = "SideBarNav"
static let webSeries = "WebSeries"
static let audioBooks = "AudioBooks"
static let Games = "Games"
}
}

View File

@@ -73,5 +73,13 @@ extension K{
static let audioBookDetailsVC = "AudioBookDetailsVC"
}
// MARK: - Games
struct Games{
static let gamesListVC = "GamesListVC"
static let gamesDetailVC = "GamesDetailVC"
static let gamesWebViewVC = "GamesWebViewVC"
}
}
}

View File

@@ -0,0 +1,163 @@
//
// GamesDetailVC.swift
// WOKA
//
// Created by MacBook Pro on 04/07/24.
//
import UIKit
class GamesDetailVC: UIViewController {
@IBOutlet weak var watchingImage: UIImageView!
@IBOutlet weak var watchingTitle: UILabel!
@IBOutlet weak var watchingDesc: UITextView!
@IBOutlet weak var addIcon: UIImageView!
@IBOutlet weak var addLabel: UILabel!
@IBOutlet weak var likeIcon: UIImageView!
@IBOutlet weak var likeLabel: UILabel!
@IBOutlet weak var totalLikes: UILabel!
@IBOutlet weak var addView: UIView!
@IBOutlet weak var shareView: UIView!
@IBOutlet weak var likeView: UIView!
var gameData : GamesListDM.GameDatum?
var delegate : ReloadSeriesFavLike?
var gameIndex = 0
override func viewDidLoad() {
super.viewDidLoad()
initView()
tapHandler()
}
func initView(){
if let gameData{
if let url = gameData.thumbnailPath{
watchingImage.imageURL(url, color: .white)
}
totalLikes.text = gameData.likesCount?.toString() ?? "0"
if let like = gameData.isLiked{
switch like{
case true:
likeIcon.image = UIImage(systemName: "hand.thumbsup.fill")
likeLabel.text = "LIKED".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
case false:
likeIcon.image = UIImage(systemName: "hand.thumbsup")
likeLabel.text = "LIKE".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
}
}
if let favourite = gameData.markAsFavourite{
if favourite == true{
addIcon.image = UIImage(systemName: "heart.fill")
addLabel.text = "ADDED".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
}else{
addIcon.image = UIImage(systemName: "heart")
addLabel.text = "ADD".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
}
}
if AuthFunc.shareInstance.getDefaultLanguage() == .english{
if let englishData = gameData.contentMoreDetails?.filter({$0.languageMasterID == 1}).first{
watchingTitle.text = englishData.title
if let desc = englishData.description?.replacingOccurrences(of: "<br>", with: "").htmlToAttributedString{
let sizeText = NSMutableAttributedString(attributedString: desc)
sizeText.setFontFace(font: FontCustom.shareInstance.customFont(fontName: .Exo2_Regular, size: 15),color: UIColor.appColor(.TextDarkBlue)!)
self.watchingDesc.attributedText = sizeText
}
}
}else{
if let hindiData = gameData.contentMoreDetails?.filter({$0.languageMasterID == 2}).first{
watchingTitle.text = hindiData.title
if let desc = hindiData.description?.replacingOccurrences(of: "<br>", with: "").htmlToAttributedString{
let sizeText = NSMutableAttributedString(attributedString: desc)
sizeText.setFontFace(font: FontCustom.shareInstance.customFont(fontName: .Exo2_Regular, size: 15),color: UIColor.appColor(.TextDarkBlue)!)
self.watchingDesc.attributedText = sizeText
}
}
}
}
}
func tapHandler(){
self.view.addTapGesture {
self.dismiss(animated: true)
}
addView.addTapGesture { [weak self] in
guard let self else{return}
if let gameData{
guard let showID = gameData.id, let isFav = gameData.markAsFavourite, let postType = gameData.contentMoreDetails?.first?.postType else{return}
if isFav {
LikeFavCommonFunc.shareInstance.removeFavourite(postID: showID, postType: postType, categoryID: 0, vc: self) { isDone in
self.gameData?.markAsFavourite = false
K.GVar.reloadMyList = true
self.delegate?.updateRows(index: self.gameIndex, type: .favourite, isFav: false, isLike: nil)
self.initView()
}
}else{
LikeFavCommonFunc.shareInstance.addFavourite(postID: showID, postType: postType, categoryID: 0, vc: self) { isDone in
self.gameData?.markAsFavourite = true
K.GVar.reloadMyList = true
self.delegate?.updateRows(index: self.gameIndex, type: .favourite, isFav: true, isLike: nil)
self.initView()
}
}
}
}
likeView.addTapGesture { [weak self] in
guard let self else{return}
if let gameData{
guard let showID = gameData.id, let isLiked = gameData.isLiked, let postType = gameData.contentMoreDetails?.first?.postType else{return}
if isLiked{
LikeFavCommonFunc.shareInstance.unlikePost(postID: showID, postType: postType, vc: self) { isDone in
self.gameData?.isLiked = false
K.GVar.reloadMyList = true
self.delegate?.updateRows(index: self.gameIndex, type: .liked, isFav: nil, isLike: false)
self.initView()
}
}else{
LikeFavCommonFunc.shareInstance.likePost(postID: showID, postType: postType, vc: self) { isDone in
self.gameData?.isLiked = true
K.GVar.reloadMyList = true
self.delegate?.updateRows(index: self.gameIndex, type: .liked, isFav: nil, isLike: true)
self.initView()
}
}
}
}
shareView.addTapGesture {
print("share")
}
}
@IBAction func playNowBtnTapped(_ sender: LocalisedElementsButton) {
let sb = UIStoryboard(name: K.StoryBoard.Games, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Games.gamesWebViewVC) as! GamesWebViewVC
//https://wokastaging.in/wokagames/Games/html/WokaLudo/index.php
vcPush.url = self.gameData?.gameURL
vcPush.orientation = self.gameData?.screenOrientation
vcPush.modalTransitionStyle = .crossDissolve
vcPush.modalPresentationStyle = .fullScreen
self.present(vcPush, animated: true)
}
@IBAction func closeBtnTapped(_ sender: UIButton) {
self.dismiss(animated: true) {
}
}
}

View File

@@ -0,0 +1,165 @@
//
// GamesListVC.swift
// WOKA
//
// Created by MacBook Pro on 04/07/24.
//
import UIKit
class GamesListVC: UIViewController {
@IBOutlet weak var scrollView: UIScrollView!
@IBOutlet weak var headerHeight: NSLayoutConstraint!
@IBOutlet weak var gamesListingTableView: UITableView!
@IBOutlet weak var tableHeight: NSLayoutConstraint!
@IBOutlet weak var headerView: ShimmerEffectView!
@IBOutlet weak var headerImage: UIImageView!
@IBOutlet weak var headerTitleLabel: UILabel!
@IBOutlet weak var gamesLoadingView: ShimmerEffectView!
var vm = GamesListVM()
override func viewDidLoad() {
super.viewDidLoad()
vm.vc = self
vm.initView()
scrollView.delegate = self
self.title = "Games".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
navigationController?.navigationBar.shadowImage = UIImage()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.setNavigationBarHidden(false, animated: animated)
self.navigationController?.setColor(color: .white)
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
self.navigationController?.setNavigationBarHidden(true, animated: animated)
}
override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
// Customize the navigation bar's appearance
self.navigationController?.setColor(color: .black)
}
override func viewDidLayoutSubviews() {
vm.updateTableHeight()
}
}
// MARK: - TableView DataSource , Delegates
extension GamesListVC : TableViewSRC{
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return vm.gameData.count == 0 ? 2 : vm.gameData.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: K.CellIdentifier.WebSeries.webSeriesShowListingCell) as! WebSeriesShowListingCell
if vm.gameData.count == 0{
cell.showShimmer()
}else{
let data = vm.gameData[indexPath.row]
cell.setGameData(data: data)
cell.stopShimmer()
}
cell.btnTapped = { [self] (type) -> Void in
vm.updateFavLikes(type: type, index: indexPath.row)
}
return cell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
/*
Updated the top header data
*/
vm.indexToLoad = indexPath.row
vm.setHeaderData()
let data = vm.gameData[indexPath.row]
let sb = UIStoryboard(name: K.StoryBoard.Games, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Games.gamesDetailVC) as! GamesDetailVC
vcPush.modalPresentationStyle = .overCurrentContext
vcPush.modalTransitionStyle = .crossDissolve
vcPush.gameIndex = indexPath.row
vcPush.gameData = data
vcPush.delegate = self
self.present(vcPush, animated: true)
}
}
extension GamesListVC : ReloadSeriesFavLike{
func updateRows(index: Int, type: FavCellCLick, isFav: Bool?, isLike: Bool?) {
if let isFav{
switch isFav{
case true:
vm.gameData[index].markAsFavourite = true
gamesListingTableView.reloadRows(at: [IndexPath(row: index, section: 0)],with: .none)
case false:
vm.gameData[index].markAsFavourite = false
gamesListingTableView.reloadRows(at: [IndexPath(row: index, section: 0)],with: .none)
}
K.GVar.reloadMyList = true
}
if let isLike{
switch isLike{
case true:
vm.gameData[index].isLiked = true
vm.gameData[index].likesCount! += 1
gamesListingTableView.reloadRows(at: [IndexPath(row: index, section: 0)],with: .none)
case false:
vm.gameData[index].isLiked = false
vm.gameData[index].likesCount! -= 1
gamesListingTableView.reloadRows(at: [IndexPath(row: index, section: 0)],with: .none)
}
K.GVar.reloadMyList = true
}
}
}
// MARK: - Animating scrollView
extension GamesListVC: UIScrollViewDelegate {
func scrollViewDidScroll(_ scrollView: UIScrollView) {
// Get the current vertical offset of the scroll view
let y = scrollView.contentOffset.y
// Define the height range for the header view
let minHeaderHeight: CGFloat = 0.0 // Height at which the header becomes invisible
let maxHeaderHeight: CGFloat = 200.0 // Maximum height when fully visible
// Calculate the new height for the header view based on the scroll position
let newHeaderHeight: CGFloat
if y < 0 {
// When scrolling up beyond the top, ensure the header view is fully expanded
newHeaderHeight = maxHeaderHeight
} else {
// Calculate the new height for the header view, ensuring it doesn't go below the minimum height
newHeaderHeight = max(minHeaderHeight, maxHeaderHeight - y)
}
// Update the header view's height constraint with the new height
headerHeight.constant = newHeaderHeight
// Animate the layout changes to smoothly transition the header height
UIView.animate(withDuration: 0.3) {
self.view.layoutIfNeeded()
}
}
}

View File

@@ -0,0 +1,83 @@
//
// GamesWebViewVC.swift
// WOKA
//
// Created by MacBook Pro on 04/07/24.
//
import UIKit
import WebKit
class GamesWebViewVC: UIViewController {
var url : String?
var orientation : ScreenOrientation?
@IBOutlet weak var webView: WKWebView!
override func viewDidLoad() {
super.viewDidLoad()
if let orientation, orientation == .landscape{
rotateToLandsScapeDevice()
}
guard let url else{return}
let authUrl = url + "?tk=" + AuthFunc.shareInstance.getAccessToken()
let link = URL(string: authUrl)!
let request = URLRequest(url: link)
webView.load(request)
}
func rotateToLandsScapeDevice(){
let appDelegate = UIApplication.shared.delegate as! AppDelegate
appDelegate.myOrientation = .landscapeRight
if #available(iOS 16.0, *) {
let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene
windowScene?.requestGeometryUpdate(.iOS(interfaceOrientations: UIInterfaceOrientationMask.landscapeRight))
} else {
UIDevice.current.setValue(UIInterfaceOrientationMask.landscapeRight.rawValue, forKey: "orientation")
}
UIView.setAnimationsEnabled(true)
}
func rotateToPotraitScapeDevice(){
let appDelegate = UIApplication.shared.delegate as! AppDelegate
appDelegate.myOrientation = .portrait
if #available(iOS 16.0, *) {
let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene
windowScene?.requestGeometryUpdate(.iOS(interfaceOrientations: UIInterfaceOrientationMask.portrait))
} else {
UIDevice.current.setValue(UIInterfaceOrientationMask.landscapeRight.rawValue, forKey: "orientation")
}
// UIDevice.current.setValue(UIInterfaceOrientation.portrait.rawValue, forKey: "orientation")
UIView.setAnimationsEnabled(true)
}
@IBAction func backBtnTapped(_ sender: UIButton) {
let sb = UIStoryboard(name: K.StoryBoard.customAlerts, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.CustomAlerts.yesNoAlertVC) as! YesNoAlertVC
vcPush.mainTitleText = "Warning"
vcPush.contentLabel = "Clicking \"OK\" will exit you from the game. Are you sure you want to proceed?"
vcPush.yesBtnText = "OK"
vcPush.noBtnText = "Cancel"
vcPush.onDoneBlock = { mode in
switch mode{
case .yes:
self.rotateToPotraitScapeDevice()
Timer.scheduledTimer(withTimeInterval: 1, repeats: false) { _ in
self.dismiss(animated: true)
}
case .no:
print("no")
}
}
vcPush.modalPresentationStyle = .overCurrentContext
vcPush.modalTransitionStyle = .crossDissolve
self.present(vcPush, animated: true)
}
}

558
WOKA/Games/Games.storyboard Normal file
View File

@@ -0,0 +1,558 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<customFonts key="customFonts">
<array key="Exo2-Bold.ttf">
<string>Exo2-Bold</string>
</array>
<array key="Exo2-Regular.ttf">
<string>Exo2-Regular</string>
</array>
</customFonts>
<scenes>
<!--Games ListVC-->
<scene sceneID="s0d-6b-0kx">
<objects>
<viewController storyboardIdentifier="GamesListVC" id="Y6W-OH-hqX" customClass="GamesListVC" customModule="WOKA" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="5EZ-qb-Rvc">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mer-q0-6Vp" customClass="ShimmerEffectView" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="48" width="414" height="200"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Kgv-cB-NPV">
<rect key="frame" x="0.0" y="0.0" width="414" height="200"/>
<color key="backgroundColor" red="0.019607843140000001" green="0.0" blue="0.21960784310000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="Kgv-cB-NPV" firstAttribute="leading" secondItem="mer-q0-6Vp" secondAttribute="leading" id="C2u-8s-Ul3"/>
<constraint firstAttribute="trailing" secondItem="Kgv-cB-NPV" secondAttribute="trailing" id="GVe-NY-fzo"/>
<constraint firstAttribute="bottom" secondItem="Kgv-cB-NPV" secondAttribute="bottom" id="XfC-zb-0Ob"/>
<constraint firstAttribute="height" constant="200" id="eU7-Gn-MJi"/>
<constraint firstItem="Kgv-cB-NPV" firstAttribute="top" secondItem="mer-q0-6Vp" secondAttribute="top" id="yCU-XG-dQf"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="isSkeletonable" value="YES"/>
</userDefinedRuntimeAttributes>
</view>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="nc1-t0-Kr8">
<rect key="frame" x="0.0" y="248" width="414" height="648"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mTn-30-lIq" customClass="ShimmerEffectView" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="414" height="108"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="pTM-Gw-0gL">
<rect key="frame" x="0.0" y="0.0" width="414" height="108"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="LOADING..." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7BL-Zy-PFm">
<rect key="frame" x="143" y="0.0" width="128.5" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="RBd-ac-t4j"/>
</constraints>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="26"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2MA-Jr-TEh" customClass="LocalisedElementsButton" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="147" y="58" width="120" height="50"/>
<color key="backgroundColor" red="0.80000000000000004" green="0.29411764705882354" blue="0.11372549019607843" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="2ov-4u-xo4"/>
<constraint firstAttribute="width" constant="120" id="e0f-d4-cHh"/>
</constraints>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="14"/>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="GAMES"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="25"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</button>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="pTM-Gw-0gL" firstAttribute="leading" secondItem="mTn-30-lIq" secondAttribute="leading" id="BBn-cw-rz4"/>
<constraint firstAttribute="trailing" secondItem="pTM-Gw-0gL" secondAttribute="trailing" id="NZU-BE-9FK"/>
<constraint firstAttribute="bottom" secondItem="pTM-Gw-0gL" secondAttribute="bottom" id="XGT-au-W20"/>
<constraint firstItem="pTM-Gw-0gL" firstAttribute="top" secondItem="mTn-30-lIq" secondAttribute="top" id="nhN-LA-fh9"/>
</constraints>
</view>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Jyq-DW-OZz">
<rect key="frame" x="0.0" y="116" width="414" height="532"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="KYp-fS-yk4">
<rect key="frame" x="0.0" y="0.0" width="414" height="55"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="HAVE A FUN TIME" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MGh-K4-gtY" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="10" y="0.0" width="394" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="Q7A-ke-WrT"/>
</constraints>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="244" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="pP6-WY-FP2">
<rect key="frame" x="10" y="55" width="394" height="0.0"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" id="DJl-l2-EKl"/>
</constraints>
</tableView>
</subviews>
<edgeInsets key="layoutMargins" top="0.0" left="10" bottom="0.0" right="10"/>
</stackView>
</subviews>
<constraints>
<constraint firstItem="KYp-fS-yk4" firstAttribute="leading" secondItem="AJd-4k-D40" secondAttribute="leading" id="LpW-3O-Ssq"/>
<constraint firstItem="AJd-4k-D40" firstAttribute="trailing" secondItem="KYp-fS-yk4" secondAttribute="trailing" id="dNA-o5-y3q"/>
<constraint firstItem="KYp-fS-yk4" firstAttribute="top" secondItem="Jyq-DW-OZz" secondAttribute="top" id="iLY-OH-mO9"/>
<constraint firstItem="KYp-fS-yk4" firstAttribute="width" secondItem="jdX-Et-rE7" secondAttribute="width" id="mKL-fq-McV"/>
<constraint firstAttribute="bottom" secondItem="KYp-fS-yk4" secondAttribute="bottom" id="xhQ-mz-2Yz"/>
</constraints>
<viewLayoutGuide key="contentLayoutGuide" id="jdX-Et-rE7"/>
<viewLayoutGuide key="frameLayoutGuide" id="AJd-4k-D40"/>
</scrollView>
</subviews>
<color key="backgroundColor" red="0.019607843140000001" green="0.0" blue="0.21960784310000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</stackView>
</subviews>
<viewLayoutGuide key="safeArea" id="vDu-zF-Fre"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="nc1-t0-Kr8" firstAttribute="leading" secondItem="vDu-zF-Fre" secondAttribute="leading" id="3QH-ow-RBF"/>
<constraint firstAttribute="trailing" secondItem="nc1-t0-Kr8" secondAttribute="trailing" id="Eur-bw-kP5"/>
<constraint firstItem="nc1-t0-Kr8" firstAttribute="top" secondItem="mer-q0-6Vp" secondAttribute="bottom" id="Lp8-6C-voY"/>
<constraint firstAttribute="bottom" secondItem="nc1-t0-Kr8" secondAttribute="bottom" id="YKZ-3i-Hqw"/>
<constraint firstAttribute="trailing" secondItem="mer-q0-6Vp" secondAttribute="trailing" id="b60-eV-Kvu"/>
<constraint firstItem="mer-q0-6Vp" firstAttribute="top" secondItem="vDu-zF-Fre" secondAttribute="top" id="fmt-HI-56n"/>
<constraint firstItem="mer-q0-6Vp" firstAttribute="leading" secondItem="vDu-zF-Fre" secondAttribute="leading" id="yZC-cV-C7l"/>
</constraints>
</view>
<connections>
<outlet property="gamesListingTableView" destination="pP6-WY-FP2" id="mWN-yu-zs1"/>
<outlet property="gamesLoadingView" destination="mTn-30-lIq" id="5bF-uk-ObF"/>
<outlet property="headerHeight" destination="eU7-Gn-MJi" id="nBh-iw-8tI"/>
<outlet property="headerImage" destination="Kgv-cB-NPV" id="HPo-R5-rj0"/>
<outlet property="headerTitleLabel" destination="7BL-Zy-PFm" id="kro-hg-bg7"/>
<outlet property="headerView" destination="mer-q0-6Vp" id="Ni3-qe-8Ud"/>
<outlet property="scrollView" destination="Jyq-DW-OZz" id="1eX-0n-4I1"/>
<outlet property="tableHeight" destination="DJl-l2-EKl" id="5Fi-db-TJJ"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Ief-a0-LHa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-62" y="4"/>
</scene>
<!--Games DetailVC-->
<scene sceneID="UIo-ni-Jr8">
<objects>
<viewController storyboardIdentifier="GamesDetailVC" id="FeA-a2-XWP" customClass="GamesDetailVC" customModule="WOKA" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Zv4-IB-OTZ">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view alpha="0.60000002384185791" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RCP-5r-oN0">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ucy-1t-PiR">
<rect key="frame" x="0.0" y="164" width="414" height="582"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="WebSeriesSeasonsBackground" translatesAutoresizingMaskIntoConstraints="NO" id="5o0-6F-ktG">
<rect key="frame" x="0.0" y="0.0" width="414" height="582"/>
</imageView>
<stackView opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="nQC-zB-K73">
<rect key="frame" x="0.0" y="0.0" width="414" height="567"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="c3p-32-XAD">
<rect key="frame" x="0.0" y="0.0" width="414" height="50"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="OP8-D5-0eS">
<rect key="frame" x="369" y="10" width="40" height="40"/>
<constraints>
<constraint firstAttribute="width" secondItem="OP8-D5-0eS" secondAttribute="height" multiplier="1:1" id="fTq-jm-g0a"/>
</constraints>
<color key="tintColor" red="0.1058823529" green="0.050980392159999999" blue="0.60392156860000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="CloseIconEmpty"/>
<connections>
<action selector="closeBtnTapped:" destination="FeA-a2-XWP" eventType="touchUpInside" id="A72-oh-eWK"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="OP8-D5-0eS" firstAttribute="top" secondItem="c3p-32-XAD" secondAttribute="top" constant="10" id="7hV-ah-WCY"/>
<constraint firstAttribute="trailing" secondItem="OP8-D5-0eS" secondAttribute="trailing" constant="5" id="Lsj-ep-7ne"/>
<constraint firstAttribute="bottom" secondItem="OP8-D5-0eS" secondAttribute="bottom" id="OhN-tC-zBO"/>
<constraint firstAttribute="height" constant="50" id="tlX-BF-r6G"/>
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="3RT-ls-DsX" userLabel="MainStack">
<rect key="frame" x="0.0" y="50" width="414" height="517"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="w8g-x6-7gZ" customClass="ShadowView" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="13" y="5" width="388" height="200"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="u5i-DZ-Ann">
<rect key="frame" x="8" y="8" width="372" height="184"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="10"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</imageView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="200" id="Bmy-ED-eNf"/>
<constraint firstItem="u5i-DZ-Ann" firstAttribute="leading" secondItem="w8g-x6-7gZ" secondAttribute="leading" constant="8" id="TUV-ip-wwK"/>
<constraint firstAttribute="bottom" secondItem="u5i-DZ-Ann" secondAttribute="bottom" constant="8" id="VpO-qO-oPW"/>
<constraint firstItem="u5i-DZ-Ann" firstAttribute="top" secondItem="w8g-x6-7gZ" secondAttribute="top" constant="8" id="evh-9I-PHW"/>
<constraint firstAttribute="trailing" secondItem="u5i-DZ-Ann" secondAttribute="trailing" constant="8" id="qLj-h9-6WQ"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="10"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="Cdl-Xn-tQb">
<rect key="frame" x="13" y="215" width="388" height="22"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="dasdasdas" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WUJ-kH-7Zm">
<rect key="frame" x="0.0" y="0.0" width="92" height="22"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
<color key="textColor" name="TextDarkBlue"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" spacing="4" translatesAutoresizingMaskIntoConstraints="NO" id="VXj-PM-sIN">
<rect key="frame" x="355" y="0.0" width="33" height="22"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="hand.thumbsup.fill" catalog="system" translatesAutoresizingMaskIntoConstraints="NO" id="vEt-yt-09k">
<rect key="frame" x="0.0" y="0.5" width="20.5" height="21"/>
<color key="tintColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eEA-u2-Gv0">
<rect key="frame" x="24.5" y="0.0" width="8.5" height="22"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
</stackView>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="r9l-fV-2Nr">
<rect key="frame" x="13" y="247" width="388" height="180"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="180" id="yP4-TH-U5o"/>
</constraints>
<string key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.</string>
<color key="textColor" systemColor="labelColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" translatesAutoresizingMaskIntoConstraints="NO" id="Lmn-vo-lr0">
<rect key="frame" x="13" y="437" width="388" height="50"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="tailTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vu0-19-CrO" customClass="LocalisedElementsButton" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="155" height="50"/>
<color key="backgroundColor" red="0.80000000000000004" green="0.29411764709999999" blue="0.1137254902" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" constant="155" id="4Ia-8e-8YT"/>
<constraint firstAttribute="height" constant="50" id="drX-c5-gZX"/>
</constraints>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<inset key="titleEdgeInsets" minX="5" minY="0.0" maxX="0.0" maxY="0.0"/>
<inset key="imageEdgeInsets" minX="-10" minY="0.0" maxX="10" maxY="0.0"/>
<state key="normal" title="PLAY NOW" image="PlayButtonSmall"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="25"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="playNowBtnTapped:" destination="FeA-a2-XWP" eventType="touchUpInside" id="B7K-xk-96K"/>
</connections>
</button>
<stackView opaque="NO" contentMode="scaleToFill" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="nVv-sN-bPE">
<rect key="frame" x="234.5" y="0.0" width="153.5" height="50"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DaB-GB-ixm">
<rect key="frame" x="0.0" y="0.0" width="40" height="50"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="BUw-5g-cpX">
<rect key="frame" x="0.0" y="0.0" width="40" height="50"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" image="FavouriteRemove" translatesAutoresizingMaskIntoConstraints="NO" id="Cxh-9y-gke">
<rect key="frame" x="5" y="0.0" width="30" height="36"/>
<color key="tintColor" name="ImageDarkBlue"/>
<constraints>
<constraint firstAttribute="width" constant="30" id="wv8-0G-fJr"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ADDED" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1Fv-F8-Ru7" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.5" y="36" width="38.5" height="14"/>
<constraints>
<constraint firstAttribute="height" constant="14" id="ZMU-2z-7Ui"/>
</constraints>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="12"/>
<color key="textColor" name="ImageDarkBlue"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="BUw-5g-cpX" firstAttribute="top" secondItem="DaB-GB-ixm" secondAttribute="top" id="2Dx-EP-ZNi"/>
<constraint firstItem="BUw-5g-cpX" firstAttribute="leading" secondItem="DaB-GB-ixm" secondAttribute="leading" id="2vC-jG-GY6"/>
<constraint firstAttribute="trailing" secondItem="BUw-5g-cpX" secondAttribute="trailing" id="QTO-Ib-cne"/>
<constraint firstAttribute="width" constant="40" id="Vvv-6b-jcH"/>
<constraint firstAttribute="bottom" secondItem="BUw-5g-cpX" secondAttribute="bottom" id="rRT-Q0-slt"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="KIg-Up-J77" userLabel="Seperator">
<rect key="frame" x="48" y="0.0" width="0.5" height="50"/>
<color key="backgroundColor" name="TextDarkBlue"/>
<constraints>
<constraint firstAttribute="width" constant="0.80000000000000004" id="x0a-z3-pMX"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qte-U6-Saw">
<rect key="frame" x="56.5" y="0.0" width="40" height="50"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="Uqb-K3-qnP">
<rect key="frame" x="0.0" y="0.0" width="40" height="50"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" image="ShareImage" translatesAutoresizingMaskIntoConstraints="NO" id="Ecl-Cc-eLy">
<rect key="frame" x="10" y="0.0" width="20" height="36"/>
<color key="tintColor" name="ImageDarkBlue"/>
<constraints>
<constraint firstAttribute="width" constant="20" id="tI7-Qf-Bkd"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SHARE" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hji-n5-pdy" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="2" y="36" width="36.5" height="14"/>
<constraints>
<constraint firstAttribute="height" constant="14" id="CM6-f9-bSd"/>
</constraints>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="12"/>
<color key="textColor" name="ImageDarkBlue"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstAttribute="width" constant="40" id="7o5-2i-Ogf"/>
</constraints>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="Uqb-K3-qnP" secondAttribute="trailing" id="GOI-Ni-c18"/>
<constraint firstItem="Uqb-K3-qnP" firstAttribute="top" secondItem="qte-U6-Saw" secondAttribute="top" id="cGc-2v-Hwa"/>
<constraint firstAttribute="bottom" secondItem="Uqb-K3-qnP" secondAttribute="bottom" id="fU7-dt-fbf"/>
<constraint firstItem="Uqb-K3-qnP" firstAttribute="leading" secondItem="qte-U6-Saw" secondAttribute="leading" id="qZD-wV-eH7"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gdt-z9-3qZ" userLabel="Seperator">
<rect key="frame" x="104.5" y="0.0" width="1" height="50"/>
<color key="backgroundColor" name="TextDarkBlue"/>
<constraints>
<constraint firstAttribute="width" constant="0.80000000000000004" id="34C-aA-o6k"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oeh-Ro-EPx">
<rect key="frame" x="113.5" y="0.0" width="40" height="50"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="zsF-ux-wvJ">
<rect key="frame" x="0.0" y="0.0" width="40" height="50"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" image="LikeRemove" translatesAutoresizingMaskIntoConstraints="NO" id="eVc-5U-A21">
<rect key="frame" x="7.5" y="0.0" width="25" height="36"/>
<color key="tintColor" name="ImageDarkBlue"/>
<constraints>
<constraint firstAttribute="width" constant="25" id="PRA-rz-JlT"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="LIKE" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="y0P-dN-8KQ" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="8.5" y="36" width="23.5" height="14"/>
<constraints>
<constraint firstAttribute="height" constant="14" id="89G-hA-PsC"/>
</constraints>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="12"/>
<color key="textColor" name="ImageDarkBlue"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="zsF-ux-wvJ" secondAttribute="bottom" id="09X-kE-15I"/>
<constraint firstItem="zsF-ux-wvJ" firstAttribute="top" secondItem="oeh-Ro-EPx" secondAttribute="top" id="OiU-VH-yaH"/>
<constraint firstAttribute="width" constant="40" id="ktV-Ki-ZJa"/>
<constraint firstAttribute="trailing" secondItem="zsF-ux-wvJ" secondAttribute="trailing" id="mWZ-FW-q5c"/>
<constraint firstItem="zsF-ux-wvJ" firstAttribute="leading" secondItem="oeh-Ro-EPx" secondAttribute="leading" id="p7P-Ii-iTe"/>
</constraints>
</view>
</subviews>
</stackView>
</subviews>
<constraints>
<constraint firstAttribute="height" constant="50" id="Z87-Us-Vgn"/>
</constraints>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<edgeInsets key="layoutMargins" top="5" left="13" bottom="30" right="13"/>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="10"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="5o0-6F-ktG" secondAttribute="trailing" id="SIS-R9-AqX"/>
<constraint firstItem="nQC-zB-K73" firstAttribute="leading" secondItem="Ucy-1t-PiR" secondAttribute="leading" id="XUz-Xa-4ka"/>
<constraint firstItem="5o0-6F-ktG" firstAttribute="top" secondItem="Ucy-1t-PiR" secondAttribute="top" id="bIw-Fh-ICA"/>
<constraint firstItem="nQC-zB-K73" firstAttribute="top" secondItem="Ucy-1t-PiR" secondAttribute="top" id="fsY-Vg-pZB"/>
<constraint firstItem="5o0-6F-ktG" firstAttribute="leading" secondItem="Ucy-1t-PiR" secondAttribute="leading" id="kIo-su-Mb0"/>
<constraint firstAttribute="bottom" secondItem="5o0-6F-ktG" secondAttribute="bottom" id="r8i-ah-LOP"/>
<constraint firstAttribute="trailing" secondItem="nQC-zB-K73" secondAttribute="trailing" id="x0m-jf-OHr"/>
<constraint firstAttribute="bottom" secondItem="nQC-zB-K73" secondAttribute="bottom" constant="15" id="xmv-Wx-juu"/>
</constraints>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="uQo-1E-vGd"/>
<constraints>
<constraint firstItem="RCP-5r-oN0" firstAttribute="leading" secondItem="Zv4-IB-OTZ" secondAttribute="leading" id="COX-z6-jLP"/>
<constraint firstItem="Ucy-1t-PiR" firstAttribute="centerY" secondItem="uQo-1E-vGd" secondAttribute="centerY" id="HxM-WN-Gfb"/>
<constraint firstAttribute="bottom" secondItem="RCP-5r-oN0" secondAttribute="bottom" id="OMI-Js-FOb"/>
<constraint firstItem="Ucy-1t-PiR" firstAttribute="leading" secondItem="uQo-1E-vGd" secondAttribute="leading" id="TID-Ya-FA9"/>
<constraint firstItem="uQo-1E-vGd" firstAttribute="trailing" secondItem="RCP-5r-oN0" secondAttribute="trailing" id="YhP-eP-SVQ"/>
<constraint firstItem="uQo-1E-vGd" firstAttribute="trailing" secondItem="Ucy-1t-PiR" secondAttribute="trailing" id="hBg-A1-g4M"/>
<constraint firstItem="RCP-5r-oN0" firstAttribute="top" secondItem="Zv4-IB-OTZ" secondAttribute="top" id="zxa-5R-kN5"/>
</constraints>
</view>
<connections>
<outlet property="addIcon" destination="Cxh-9y-gke" id="yB8-CP-yfU"/>
<outlet property="addLabel" destination="1Fv-F8-Ru7" id="gjZ-gM-JFH"/>
<outlet property="addView" destination="DaB-GB-ixm" id="Fid-Fh-KZt"/>
<outlet property="likeIcon" destination="eVc-5U-A21" id="G3L-AP-bKQ"/>
<outlet property="likeLabel" destination="y0P-dN-8KQ" id="Mea-GN-npi"/>
<outlet property="likeView" destination="oeh-Ro-EPx" id="q5F-KK-n2E"/>
<outlet property="shareView" destination="qte-U6-Saw" id="tzG-cA-Q5Q"/>
<outlet property="totalLikes" destination="eEA-u2-Gv0" id="8LM-Nq-tao"/>
<outlet property="watchingDesc" destination="r9l-fV-2Nr" id="IXK-d7-w03"/>
<outlet property="watchingImage" destination="u5i-DZ-Ann" id="e7y-bP-BZv"/>
<outlet property="watchingTitle" destination="WUJ-kH-7Zm" id="bbb-8H-XAZ"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="NAd-Du-ulh" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="772" y="-1"/>
</scene>
<!--Games Web ViewVC-->
<scene sceneID="g3m-oE-oPZ">
<objects>
<viewController storyboardIdentifier="GamesWebViewVC" id="d4p-BC-w3w" customClass="GamesWebViewVC" customModule="WOKA" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8Dy-BS-4tC">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<wkWebView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="k9t-dv-nhb">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<wkWebViewConfiguration key="configuration">
<audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/>
<wkPreferences key="preferences"/>
</wkWebViewConfiguration>
</wkWebView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7Qp-yb-i2l">
<rect key="frame" x="7" y="58" width="35" height="35"/>
<color key="backgroundColor" name="ImageDarkBlue"/>
<constraints>
<constraint firstAttribute="height" constant="35" id="0zf-D6-EUZ"/>
<constraint firstAttribute="width" constant="35" id="8ns-7j-2y8"/>
</constraints>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="BackArrow"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="4"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="backBtnTapped:" destination="d4p-BC-w3w" eventType="touchUpInside" id="s9j-nO-BEo"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="UAe-my-8xP"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="7Qp-yb-i2l" firstAttribute="top" secondItem="UAe-my-8xP" secondAttribute="top" constant="10" id="Oxh-34-kbI"/>
<constraint firstItem="k9t-dv-nhb" firstAttribute="top" secondItem="8Dy-BS-4tC" secondAttribute="top" id="Tj3-by-0aA"/>
<constraint firstItem="k9t-dv-nhb" firstAttribute="leading" secondItem="UAe-my-8xP" secondAttribute="leading" id="dmX-Nj-8mc"/>
<constraint firstAttribute="bottom" secondItem="k9t-dv-nhb" secondAttribute="bottom" id="nbu-MB-upl"/>
<constraint firstItem="7Qp-yb-i2l" firstAttribute="leading" secondItem="UAe-my-8xP" secondAttribute="leading" constant="7" id="otO-uz-8gX"/>
<constraint firstItem="UAe-my-8xP" firstAttribute="trailing" secondItem="k9t-dv-nhb" secondAttribute="trailing" id="zmC-r9-WYr"/>
</constraints>
</view>
<connections>
<outlet property="webView" destination="k9t-dv-nhb" id="3fK-U0-3Dd"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="hXA-NY-nAf" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1580" y="-1"/>
</scene>
</scenes>
<resources>
<image name="BackArrow" width="21.333333969116211" height="21.333333969116211"/>
<image name="CloseIconEmpty" width="30" height="30"/>
<image name="FavouriteRemove" width="42.5" height="42.5"/>
<image name="LikeRemove" width="42.5" height="42.5"/>
<image name="PlayButtonSmall" width="28.333333969116211" height="28.333333969116211"/>
<image name="ShareImage" width="18" height="18"/>
<image name="WebSeriesSeasonsBackground" width="142.66667175292969" height="187.33332824707031"/>
<image name="hand.thumbsup.fill" catalog="system" width="128" height="121"/>
<namedColor name="ImageDarkBlue">
<color red="0.035000000149011612" green="0.0" blue="0.36500000953674316" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="TextDarkBlue">
<color red="0.10599999874830246" green="0.050999999046325684" blue="0.60399997234344482" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<systemColor name="labelColor">
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View File

@@ -0,0 +1,78 @@
//
// GamesListDM.swift
// WOKA
//
// Created by MacBook Pro on 04/07/24.
//
import Foundation
enum ScreenOrientation: String, Codable {
case landscape = "Landscape"
case portrait = "Portrait"
}
// MARK: - GamesListDM
struct GamesListDM: Codable {
let gameData: [GameDatum]?
let totalRecords: Int?
enum CodingKeys: String, CodingKey {
case gameData = "game_data"
case totalRecords = "total_records"
}
// MARK: - GameDatum
struct GameDatum: Codable {
let id: Int?
let title, description: String?
let gameURL: String?
let screenOrientation: ScreenOrientation?
let thumbnailPath: String?
let categoryMasterID, ageRangeMasterID: String?
let releaseDate: String?
let languageMasterID: Int?
let genderMasterID: String?
let contentMoreDetails: [ContentMoreDetail]?
// let categoryData, ageRangeData, genderData: [JSONAny]?
var markAsFavourite, isLiked: Bool?
var likesCount, bookmarkCount: Int?
enum CodingKeys: String, CodingKey {
case id, title, description
case gameURL = "game_url"
case screenOrientation = "screen_orientation"
case thumbnailPath = "thumbnail_path"
case categoryMasterID = "category_master_id"
case ageRangeMasterID = "age_range_master_id"
case releaseDate = "release_date"
case languageMasterID = "language_master_id"
case genderMasterID = "gender_master_id"
case contentMoreDetails = "content_more_details"
// case categoryData = "category_data"
// case ageRangeData = "age_range_data"
// case genderData = "gender_data"
case markAsFavourite = "mark_as_favourite"
case isLiked = "is_liked"
case likesCount = "likes_count"
case bookmarkCount = "bookmark_count"
}
}
// MARK: - ContentMoreDetail
struct ContentMoreDetail: Codable {
let id, contentID, postType, languageMasterID: Int?
let title, description, tagsKeywords: String?
let url: String?
enum CodingKeys: String, CodingKey {
case id
case contentID = "content_id"
case postType = "post_type"
case languageMasterID = "language_master_id"
case title, description
case tagsKeywords = "tags_keywords"
case url
}
}
}

View File

@@ -0,0 +1,160 @@
//
// GamesListVM.swift
// WOKA
//
// Created by MacBook Pro on 04/07/24.
//
import UIKit
import Alamofire
class GamesListVM{
weak var vc : GamesListVC!
var gameData = [GamesListDM.GameDatum]()
var indexToLoad = 0
func initView(){
setupCell()
let color1 = #colorLiteral(red: 0.8, green: 0.6078431373, blue: 0.1098039216, alpha: 1)
let color2 = #colorLiteral(red: 0.8, green: 0.2901960784, blue: 0.1098039216, alpha: 1)
self.vc.view.applyGradient(colors: [color1,color2], startPoint: .Point.left.point , endPoint: .Point.right.point)
startShimmer()
getGamesListing()
}
func setupCell(){
vc.gamesListingTableView.register(UINib(nibName: K.CellIdentifier.WebSeries.webSeriesShowListingCell, bundle: nil), forCellReuseIdentifier: K.CellIdentifier.WebSeries.webSeriesShowListingCell)
vc.gamesListingTableView.delegate = vc.self
vc.gamesListingTableView.dataSource = vc.self
}
func startShimmer(){
vc.headerView.startShimmer()
vc.gamesLoadingView.startShimmer()
}
func stopShimmer(){
vc.headerView.stopShimmer()
vc.gamesLoadingView.stopShimmer()
}
func setHeaderData(){
let data = gameData[indexToLoad]
if let url = data.thumbnailPath{
self.vc.headerImage.imageURL(url, color: .white)
}
if AuthFunc.shareInstance.getDefaultLanguage() == .english{
let englishData = data.contentMoreDetails?.filter({$0.languageMasterID == 1}).first
vc.headerTitleLabel.text = englishData?.title
}else{
let hindiData = data.contentMoreDetails?.filter({$0.languageMasterID == 2}).first
vc.headerTitleLabel.text = hindiData?.title
}
}
func updateTableHeight(){
self.vc.tableHeight.constant = self.vc.gamesListingTableView.contentSize.height + 100
self.vc.gamesListingTableView.layoutIfNeeded()
self.vc.tableHeight.constant = self.vc.gamesListingTableView.contentSize.height
}
// MARK: - Get Games Data
func getGamesListing(){
let headers : HTTPHeaders = ["access-token" : AuthFunc.shareInstance.getAccessToken()]
NetworkManager.shareInstance.apiRequest(url: APIEndPoints.Games.game_listing, method: .post,headers: headers) { [weak self](result : Result<BaseResponseModel<GamesListDM>, NetworkManager.APIError>) in
switch result{
case .success(let data):
guard let self else{
Utilities.dismissProgressHUD()
return
}
switch data.success{
case 0:
/*
Error
*/
Utilities.dismissProgressHUD()
vc.toast(msg: data.message ?? "Unrecognised error" , time: 2)
case 1:
Utilities.dismissProgressHUD()
guard let data = data.data?.gameData else{return}
self.gameData.removeAll()
self.gameData = data
self.vc.gamesListingTableView.reloadData()
self.vc.tableHeight.constant = self.vc.gamesListingTableView.contentSize.height + 100
self.vc.gamesListingTableView.layoutIfNeeded()
self.vc.tableHeight.constant = self.vc.gamesListingTableView.contentSize.height
self.setHeaderData()
self.stopShimmer()
default:
break
}
case .failure(let error):
guard let self else{
Utilities.dismissProgressHUD()
return
}
Utilities.dismissProgressHUD()
Utilities.alertWithBtnCompletion(title: "Error", msgBody: error.localizedDescription, okBtnStr: "Retry?", vc: self.vc) { isDone in
if isDone{
self.getGamesListing()
}
}
}
}
}
// MARK: - Update Fav Likes
func updateFavLikes(type : FavCellCLick, index : Int){
let data = gameData[index]
switch type {
case .favourite:
guard let isFav = data.markAsFavourite ,let postID = data.id,let postType = data.contentMoreDetails?.first?.postType else{return}
if isFav == true {
LikeFavCommonFunc.shareInstance.removeFavourite(postID: postID, postType: postType, categoryID: 0, vc: self.vc) { [unowned self] isDone in
if isDone{
gameData[index].markAsFavourite = false
vc.gamesListingTableView.reloadRows(at: [IndexPath(row: index, section: 0)],with: .none)
K.GVar.reloadMyList = true
}
}
}else{
LikeFavCommonFunc.shareInstance.addFavourite(postID: postID, postType: postType, categoryID: 0, vc: self.vc) { [unowned self] isDone in
if isDone{
gameData[index].markAsFavourite = true
vc.gamesListingTableView.reloadRows(at: [IndexPath(row: index, section: 0)],with: .none)
K.GVar.reloadMyList = true
}
}
}
return
case .liked:
guard let isLiked = data.isLiked ,let postID = data.id,let postType = data.contentMoreDetails?.first?.postType else{return}
if isLiked{
LikeFavCommonFunc.shareInstance.unlikePost(postID: postID, postType: postType, vc: self.vc) { [unowned self] isDone in
if isDone{
gameData[index].isLiked = false
gameData[index].likesCount! -= 1
vc.gamesListingTableView.reloadRows(at: [IndexPath(row: index, section: 0)],with: .none)
K.GVar.reloadMyList = true
}
}
}else{
LikeFavCommonFunc.shareInstance.likePost(postID: postID, postType: postType, vc: self.vc){ [unowned self] isDone in
if isDone{
gameData[index].isLiked = true
gameData[index].likesCount! += 1
vc.gamesListingTableView.reloadRows(at: [IndexPath(row: index, section: 0)],with: .none)
K.GVar.reloadMyList = true
}
}
}
}
}
}

View File

@@ -232,3 +232,14 @@
"SHARE" = "शेयर";
"LIKE" = "पसंद";
"LIKED" = "पसंदिता";
/*
Audio Books
*/
"LISTEN & ENJOY" = "सुनें और आनंद लें";
"LISTEN" = "सुनें";
/*
Games
*/
"HAVE A FUN TIME" = "आनंद करने का समय";

View File

@@ -94,6 +94,11 @@ struct APIEndPoints {
static let listen_audio_listing = makeURL(path: "listen_audio_listing")
}
struct Games{
static let game_listing = makeURL(path: "game_listing")
static let get_token_to_auth_player = makeURL(path: "get_token_to_auth_player")
}
// Other endpoint categories...
struct Links {
static let privacyPolicy = "https://www.wokaland.com/privacy-policy/"

View File

@@ -215,7 +215,7 @@
<rect key="frame" x="0.0" y="395.66666666666674" width="393" height="456.33333333333326"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillProportionally" spacing="1" translatesAutoresizingMaskIntoConstraints="NO" id="Ehe-Th-asW" userLabel="Shop">
<rect key="frame" x="288" y="0.0" width="95" height="95"/>
<rect key="frame" x="288" y="-10" width="95" height="95"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Shop" translatesAutoresizingMaskIntoConstraints="NO" id="z9r-YX-CUk">
<rect key="frame" x="0.0" y="0.0" width="95" height="79"/>
@@ -235,7 +235,7 @@
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillProportionally" spacing="1" translatesAutoresizingMaskIntoConstraints="NO" id="lRy-nX-Xia" userLabel="LiveTV">
<rect key="frame" x="149" y="52.333333333333314" width="95" height="95"/>
<rect key="frame" x="149" y="42.333333333333314" width="95" height="95"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LiveTV" translatesAutoresizingMaskIntoConstraints="NO" id="LoO-Qh-9ci">
<rect key="frame" x="0.0" y="0.0" width="95" height="79"/>
@@ -255,7 +255,7 @@
</constraints>
</stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GGC-rX-Pyw">
<rect key="frame" x="10" y="77.333333333333314" width="95" height="95"/>
<rect key="frame" x="10" y="67.333333333333314" width="95" height="95"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillProportionally" spacing="1" translatesAutoresizingMaskIntoConstraints="NO" id="Sp0-yh-bdj" userLabel="WebSeries">
<rect key="frame" x="0.0" y="0.0" width="95" height="95"/>
@@ -284,26 +284,36 @@
<constraint firstItem="Sp0-yh-bdj" firstAttribute="top" secondItem="GGC-rX-Pyw" secondAttribute="top" id="wcv-Pf-dXx"/>
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillProportionally" spacing="1" translatesAutoresizingMaskIntoConstraints="NO" id="r88-JP-phS" userLabel="Games">
<rect key="frame" x="298" y="134.99999999999994" width="95" height="95"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yuF-d6-Tag">
<rect key="frame" x="293" y="124.99999999999994" width="95" height="95"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Games" translatesAutoresizingMaskIntoConstraints="NO" id="rhc-kY-sTl">
<rect key="frame" x="0.0" y="0.0" width="95" height="79"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="GAMES" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="blr-Es-vfw" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="80" width="95" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="cfa-zV-qLo"/>
</constraints>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="13"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillProportionally" spacing="1" translatesAutoresizingMaskIntoConstraints="NO" id="r88-JP-phS" userLabel="Games">
<rect key="frame" x="0.0" y="0.0" width="95" height="95"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Games" translatesAutoresizingMaskIntoConstraints="NO" id="rhc-kY-sTl">
<rect key="frame" x="0.0" y="0.0" width="95" height="79"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="GAMES" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="blr-Es-vfw" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="80" width="95" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="cfa-zV-qLo"/>
</constraints>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="13"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" secondItem="r88-JP-phS" secondAttribute="height" multiplier="1:1" id="Ylk-SV-7uT"/>
<constraint firstItem="r88-JP-phS" firstAttribute="top" secondItem="yuF-d6-Tag" secondAttribute="top" id="G8g-5f-h0c"/>
<constraint firstAttribute="trailing" secondItem="r88-JP-phS" secondAttribute="trailing" id="HgM-lF-sJo"/>
<constraint firstItem="r88-JP-phS" firstAttribute="leading" secondItem="yuF-d6-Tag" secondAttribute="leading" id="Jha-qF-Bkg"/>
<constraint firstAttribute="width" secondItem="yuF-d6-Tag" secondAttribute="height" multiplier="1:1" id="eJ0-3s-WqL"/>
<constraint firstAttribute="bottom" secondItem="r88-JP-phS" secondAttribute="bottom" id="meH-ml-MUc"/>
</constraints>
</stackView>
</view>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillProportionally" spacing="1" translatesAutoresizingMaskIntoConstraints="NO" id="9fz-vc-Ufb" userLabel="Karaoke">
<rect key="frame" x="10" y="192.33333333333331" width="95" height="95"/>
<subviews>
@@ -325,7 +335,7 @@
</constraints>
</stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ugr-Tf-Y1l">
<rect key="frame" x="165" y="202.33333333333331" width="95" height="95"/>
<rect key="frame" x="165" y="200.33333333333331" width="95" height="95"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillProportionally" spacing="1" translatesAutoresizingMaskIntoConstraints="NO" id="JHO-R6-WGZ" userLabel="Audio Books">
<rect key="frame" x="0.0" y="0.0" width="95" height="95"/>
@@ -357,22 +367,20 @@
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="r88-JP-phS" firstAttribute="height" secondItem="ppi-HI-rj1" secondAttribute="height" multiplier="0.208333" id="0sg-36-CK8"/>
<constraint firstItem="Ehe-Th-asW" firstAttribute="baseline" secondItem="lRy-nX-Xia" secondAttribute="firstBaseline" constant="40" id="6HI-BQ-pxx"/>
<constraint firstItem="r88-JP-phS" firstAttribute="top" secondItem="Ehe-Th-asW" secondAttribute="bottom" constant="40" id="6wM-Ss-Lui"/>
<constraint firstItem="9fz-vc-Ufb" firstAttribute="centerX" secondItem="GGC-rX-Pyw" secondAttribute="centerX" id="7c7-bD-KbL"/>
<constraint firstItem="GGC-rX-Pyw" firstAttribute="leading" secondItem="ppi-HI-rj1" secondAttribute="leading" constant="10" id="Go0-Ui-etR"/>
<constraint firstItem="r88-JP-phS" firstAttribute="baseline" secondItem="ugr-Tf-Y1l" secondAttribute="firstBaseline" constant="25" id="KVM-oa-G0P"/>
<constraint firstItem="r88-JP-phS" firstAttribute="centerX" secondItem="Ehe-Th-asW" secondAttribute="centerX" constant="10" id="M0G-TU-M2T"/>
<constraint firstItem="GGC-rX-Pyw" firstAttribute="centerY" secondItem="lRy-nX-Xia" secondAttribute="centerY" constant="25" id="NmB-T5-Lvq"/>
<constraint firstItem="9fz-vc-Ufb" firstAttribute="height" secondItem="ppi-HI-rj1" secondAttribute="height" multiplier="0.208333" id="RjE-7v-VJf"/>
<constraint firstItem="lRy-nX-Xia" firstAttribute="height" secondItem="ppi-HI-rj1" secondAttribute="height" multiplier="0.208333" id="Slx-Jj-1Nl"/>
<constraint firstItem="ugr-Tf-Y1l" firstAttribute="centerY" secondItem="9fz-vc-Ufb" secondAttribute="centerY" constant="8" id="X1t-Qn-V4F"/>
<constraint firstItem="lRy-nX-Xia" firstAttribute="centerX" secondItem="ppi-HI-rj1" secondAttribute="centerX" id="ZMq-Za-1eg"/>
<constraint firstItem="Ehe-Th-asW" firstAttribute="height" secondItem="ppi-HI-rj1" secondAttribute="height" multiplier="0.208333" id="bYM-Cl-mWm"/>
<constraint firstItem="ugr-Tf-Y1l" firstAttribute="leading" secondItem="9fz-vc-Ufb" secondAttribute="trailing" constant="60" id="d6T-jS-Fvp"/>
<constraint firstItem="yuF-d6-Tag" firstAttribute="top" secondItem="Ehe-Th-asW" secondAttribute="bottom" constant="40" id="dOG-0I-sH8"/>
<constraint firstAttribute="trailing" secondItem="Ehe-Th-asW" secondAttribute="trailing" constant="10" id="h6R-gj-t8n"/>
<constraint firstItem="Ehe-Th-asW" firstAttribute="top" secondItem="ppi-HI-rj1" secondAttribute="top" id="rPo-rh-Nry"/>
<constraint firstItem="9fz-vc-Ufb" firstAttribute="top" secondItem="GGC-rX-Pyw" secondAttribute="bottom" constant="20" id="v9C-zO-CMS"/>
<constraint firstItem="Ehe-Th-asW" firstAttribute="top" secondItem="ppi-HI-rj1" secondAttribute="top" constant="-10" id="rPo-rh-Nry"/>
<constraint firstItem="9fz-vc-Ufb" firstAttribute="top" secondItem="GGC-rX-Pyw" secondAttribute="bottom" constant="30" id="v9C-zO-CMS"/>
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="-2" translatesAutoresizingMaskIntoConstraints="NO" id="LYo-Uy-0nM" userLabel="More">
@@ -412,6 +420,7 @@
<constraint firstItem="xgH-t8-LiX" firstAttribute="top" secondItem="U1W-OZ-7vR" secondAttribute="bottom" constant="-10" id="CIy-vs-vwp"/>
<constraint firstItem="ppi-HI-rj1" firstAttribute="trailing" secondItem="vdl-cu-G32" secondAttribute="trailing" id="DQI-oo-bqb"/>
<constraint firstItem="ppi-HI-rj1" firstAttribute="leading" secondItem="vdl-cu-G32" secondAttribute="leading" id="DnV-cr-qUh"/>
<constraint firstItem="yuF-d6-Tag" firstAttribute="trailing" secondItem="xgH-t8-LiX" secondAttribute="trailing" constant="-5" id="DrT-s8-9xs"/>
<constraint firstAttribute="bottom" secondItem="xgH-t8-LiX" secondAttribute="bottom" id="KLp-zL-JIG"/>
<constraint firstItem="sf9-me-n7i" firstAttribute="top" secondItem="vdl-cu-G32" secondAttribute="top" constant="5" id="MnT-8w-p9T"/>
<constraint firstItem="U1W-OZ-7vR" firstAttribute="centerX" secondItem="vdl-cu-G32" secondAttribute="centerX" id="NqK-Cw-qNu"/>
@@ -421,6 +430,7 @@
<constraint firstItem="xgH-t8-LiX" firstAttribute="height" secondItem="UEh-jl-IQp" secondAttribute="height" multiplier="0.539906" id="YFN-fY-VOP"/>
<constraint firstItem="rkf-MW-5IL" firstAttribute="centerY" secondItem="sf9-me-n7i" secondAttribute="centerY" constant="-20" id="ZVu-Px-dqT"/>
<constraint firstAttribute="trailing" secondItem="Qfe-q3-rbY" secondAttribute="trailing" constant="5" id="aJP-Fy-A7r"/>
<constraint firstItem="yuF-d6-Tag" firstAttribute="height" secondItem="UEh-jl-IQp" secondAttribute="height" multiplier="0.111502" id="ab3-u9-VgT"/>
<constraint firstItem="xgH-t8-LiX" firstAttribute="leading" secondItem="vdl-cu-G32" secondAttribute="leading" id="axA-78-I8c"/>
<constraint firstItem="jdZ-WQ-xcr" firstAttribute="height" secondItem="UEh-jl-IQp" secondAttribute="height" multiplier="0.625" id="dfh-6o-p0D"/>
<constraint firstItem="LYo-Uy-0nM" firstAttribute="centerX" secondItem="vdl-cu-G32" secondAttribute="centerX" id="f0k-KL-GNO"/>
@@ -445,6 +455,7 @@
<outlet property="bottomArrow" destination="rdd-P1-Vk7" id="K5z-Hv-wdR"/>
<outlet property="cloud1" destination="hnb-h6-Rgs" id="yq6-eE-20d"/>
<outlet property="cloud2" destination="lMA-vm-xCk" id="91P-Rv-qHZ"/>
<outlet property="gamesView" destination="yuF-d6-Tag" id="vpd-Cs-PPf"/>
<outlet property="gradientView" destination="jdZ-WQ-xcr" id="EPt-cC-wNC"/>
<outlet property="homeGrass" destination="bNd-CB-wx1" id="Rhs-zT-ChZ"/>
<outlet property="liveTVView" destination="kzE-UE-7KK" id="wh1-1v-X4B"/>

View File

@@ -107,17 +107,17 @@ class PlayerVC: JWPlayerViewController, JWPlayerViewControllerDelegate {
player.play()
case .webSeries:
if videoIndex == 0{
player.play()
player.seek(to: 0)
}else{
player.play()
player.stop()
player.seek(to: 1)
player.nextUpPlaylistIndex = videoIndex ?? 0
player.next()
}
case .trailer:
player.play()
case .continueWatching:
player.play()
case .continueWatching,.audioBooks, .games:
player.seek(to: 0)
// player.play()
case nil:
break
}

View File

@@ -28,6 +28,7 @@ class ThemeOneVC: UIViewController {
@IBOutlet weak var moonImage: UIImageView!
@IBOutlet weak var moreStack: UIStackView!
@IBOutlet weak var bottomArrow: UIImageView!
@IBOutlet weak var gamesView: UIView!
var timer: Timer?

View File

@@ -135,6 +135,15 @@ class ThemeOneVM{
vc.navigationController?.pushViewController(vcPush, animated: true)
}
}
vc.gamesView.addTapGesture {
ViewButtonAnimation.sharedInstance.btnTapped(in: self.vc, view: self.vc.gamesView) { [weak self] in
guard let self else{return}
let sb = UIStoryboard(name: K.StoryBoard.Games, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Games.gamesListVC) as! GamesListVC
vc.navigationController?.pushViewController(vcPush, animated: true)
}
}
}
// MARK: - Animate Clouds and LiveTV

View File

@@ -53,7 +53,10 @@ class WebSeriesSeasonVC: UIViewController {
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.setNavigationBarHidden(false, animated: animated)
self.navigationController?.setColor(color: .black)
}
override func viewDidAppear(_ animated: Bool) {
self.navigationController?.setColor(color: .white)
}
override func viewWillDisappear(_ animated: Bool) {

View File

@@ -16,7 +16,7 @@ class WebSeriesVC: UIViewController {
@IBOutlet weak var headerView: ShimmerEffectView!
@IBOutlet weak var masilaTrailerView: ShimmerEffectView!
@IBOutlet weak var videoLanguageView: ShimmerEffectView!
@IBOutlet weak var topLabel: UILabel!
@@ -156,6 +156,7 @@ extension WebSeriesVC : TableViewSRC{
}
}
}
K.GVar.reloadMyList = true
}
}

View File

@@ -13,6 +13,8 @@ enum VideoContentType{
case webSeries
case trailer
case continueWatching
case audioBooks
case games
}
struct JwPlayerItemCreate{
@@ -81,7 +83,7 @@ class JWPlayerManager {
.title(liveStreamItem.titles ?? "Trailer")
.build()
items.append(item)
case .continueWatching:
case .continueWatching, .audioBooks, .games:
guard let liveStreamItem = playerItems.first else {
print("Invalid live stream URL")
return

View File

@@ -70,13 +70,6 @@ class WebSeriesShowListingCell: UITableViewCell {
}else{
favBtn.setImage(UIImage(named: "FavouriteRemove"), for: .normal)
}
// switch favourite{
// case true:
// favBtn.setImage(UIImage(systemName: "heart.fill"), for: .normal)
// case false:
// favBtn.setImage(UIImage(systemName: "heart"), for: .normal)
//
// }
}
}
@@ -111,6 +104,37 @@ class WebSeriesShowListingCell: UITableViewCell {
}
}
func setGameData(data: GamesListDM.GameDatum){
//heart.fill , heart , hand.thumbsup.fill , hand.thumbsup
if AuthFunc.shareInstance.getDefaultLanguage() == .english{
showTitle.text = data.contentMoreDetails?.filter({$0.languageMasterID == 1}).first?.title
}else{
showTitle.text = data.contentMoreDetails?.filter({$0.languageMasterID == 2}).first?.title
}
totalLikes.text = data.likesCount?.toString() ?? "0"
if let url = data.thumbnailPath{
showThumbnail.imageURL(url)
}
if let like = data.isLiked{
switch like{
case true:
likeBtn.setImage(UIImage(named: "LikeAdd"), for: .normal)
case false:
likeBtn.setImage(UIImage(named: "LikeRemove"), for: .normal)
}
}
if let favourite = data.markAsFavourite{
if favourite == true{
favBtn.setImage(UIImage(named: "FavouriteAdd"), for: .normal)
}else{
favBtn.setImage(UIImage(named: "FavouriteRemove"), for: .normal)
}
}
}
@IBAction func btnTapped(_ sender: UIButton) {
switch sender{
case likeBtn:

View File

@@ -27,10 +27,17 @@ class WebSeriesSeasonVM{
var indexSelected : Int?
func initView(){
let color1 = #colorLiteral(red: 0.5921568627, green: 0.2588235294, blue: 0.8941176471, alpha: 1)
let color2 = #colorLiteral(red: 0.368627451, green: 0.1215686275, blue: 0.768627451, alpha: 1)
self.vc.view.applyGradient(colors: [color1,color2], startPoint: .Point.left.point , endPoint: .Point.right.point)
getSeasonListing()
setupCell()
setShowData()
handleTapGesture()
}
func handleTapGesture(){
vc.addView.addTapGesture { [weak self] in
guard let self ,let indexSelected, let categoryID, let showData, let showID = showData.id, let isFav = showData.markAsFavourite, let postType = showData.contentMoreDetails?.first?.postType else{return}

View File

@@ -379,7 +379,7 @@
<rect key="frame" x="340.66666666666669" y="0.0" width="32.333333333333314" height="49"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="hand.thumbsup.fill" catalog="system" translatesAutoresizingMaskIntoConstraints="NO" id="eng-oC-d9H">
<rect key="frame" x="0.0" y="0.66666666666666785" width="20" height="47.666666666666657"/>
<rect key="frame" x="0.0" y="0.66666666666666785" width="20" height="47.666666666666671"/>
<color key="tintColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Egv-Cu-aPK">
@@ -804,7 +804,7 @@
</stackView>
</subviews>
</stackView>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="43n-nG-E8Z">
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="43n-nG-E8Z">
<rect key="frame" x="13" y="271" width="327" height="208.66666666666663"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<string key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.</string>
@@ -967,7 +967,7 @@
</label>
</subviews>
</stackView>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="MUz-A4-7TT">
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="MUz-A4-7TT">
<rect key="frame" x="13" y="246.66666666666663" width="367" height="180"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>