diff --git a/WOKA.xcodeproj/project.pbxproj b/WOKA.xcodeproj/project.pbxproj index ad77a70..46f735b 100644 --- a/WOKA.xcodeproj/project.pbxproj +++ b/WOKA.xcodeproj/project.pbxproj @@ -30,6 +30,8 @@ 523ED2752BDA2BC900CFED02 /* WOKATests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 523ED2742BDA2BC900CFED02 /* WOKATests.swift */; }; 523ED27F2BDA2BC900CFED02 /* WOKAUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 523ED27E2BDA2BC900CFED02 /* WOKAUITests.swift */; }; 523ED2812BDA2BC900CFED02 /* WOKAUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 523ED2802BDA2BC900CFED02 /* WOKAUITestsLaunchTests.swift */; }; + 5242FE592C24203E0086A86D /* WebSeriesSeasonVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5242FE582C24203E0086A86D /* WebSeriesSeasonVC.swift */; }; + 5242FE5B2C24317A0086A86D /* WebSeriesSeasonVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5242FE5A2C24317A0086A86D /* WebSeriesSeasonVM.swift */; }; 524C422B2C04781B0016A11C /* ThemeTwoVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 524C422A2C04781B0016A11C /* ThemeTwoVM.swift */; }; 524C42312C0499560016A11C /* NotificationCenterReloads.swift in Sources */ = {isa = PBXBuildFile; fileRef = 524C42302C0499560016A11C /* NotificationCenterReloads.swift */; }; 524C42332C049D590016A11C /* CustomizableSegmentControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 524C42322C049D590016A11C /* CustomizableSegmentControl.swift */; }; @@ -57,7 +59,6 @@ 525954302BEA394400191286 /* CustomAlerts.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5259542F2BEA394300191286 /* CustomAlerts.storyboard */; }; 525954322BEA39D200191286 /* AddTapGesture.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525954312BEA39D200191286 /* AddTapGesture.swift */; }; 525954342BEA620800191286 /* IntrestTopicDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525954332BEA620800191286 /* IntrestTopicDM.swift */; }; - 525954512BEB5EB700191286 /* SkeletonView in Frameworks */ = {isa = PBXBuildFile; productRef = 525954502BEB5EB700191286 /* SkeletonView */; }; 5259545A2BEB67D200191286 /* DateFormatterLib.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525954592BEB67D200191286 /* DateFormatterLib.swift */; }; 5259545C2BEBB80400191286 /* AvatarDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5259545B2BEBB80400191286 /* AvatarDM.swift */; }; 5259545E2BEBBA1A00191286 /* LoadingIndicatorImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5259545D2BEBBA1A00191286 /* LoadingIndicatorImageView.swift */; }; @@ -73,6 +74,9 @@ 527AC6FD2C173A5100434FB7 /* SongListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 527AC6FB2C173A5100434FB7 /* SongListCell.swift */; }; 527AC6FE2C173A5100434FB7 /* SongListCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 527AC6FC2C173A5100434FB7 /* SongListCell.xib */; }; 527AC7012C182DCE00434FB7 /* TimeStringToSeconds.swift in Sources */ = {isa = PBXBuildFile; fileRef = 527AC7002C182DCE00434FB7 /* TimeStringToSeconds.swift */; }; + 528E5F1B2C24531200E33E4E /* SeasonListingDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 528E5F1A2C24531200E33E4E /* SeasonListingDM.swift */; }; + 528E5F222C24660F00E33E4E /* SeasonCategoryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 528E5F202C24660F00E33E4E /* SeasonCategoryCell.swift */; }; + 528E5F232C24660F00E33E4E /* SeasonCategoryCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 528E5F212C24660F00E33E4E /* SeasonCategoryCell.xib */; }; 529B0DD42C06156B00CFC54B /* LoginNavVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 529B0DD32C06156B00CFC54B /* LoginNavVC.swift */; }; 529B0DD62C070C0F00CFC54B /* GuestDataDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 529B0DD52C070C0F00CFC54B /* GuestDataDM.swift */; }; 52A3F6A52BECBA8D0000BB0B /* LinkedChildDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A3F6A42BECBA8D0000BB0B /* LinkedChildDM.swift */; }; @@ -130,6 +134,7 @@ 52CA28FC2BE11A0400708B49 /* UserIntrestVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52CA28FB2BE11A0400708B49 /* UserIntrestVM.swift */; }; 52CC38C32BDF812F00B74C3E /* LocalisedElements.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52CC38C22BDF812F00B74C3E /* LocalisedElements.swift */; }; 52CCD7B02C1AF0F80078BD65 /* RadioVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52CCD7AF2C1AF0F80078BD65 /* RadioVC.swift */; }; + 52D2F3D82C24043D009E52FF /* ShimmerEffectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D2F3D72C24043D009E52FF /* ShimmerEffectView.swift */; }; 52D6A2462C21A29800145908 /* ContinueWatchingDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D6A2452C21A29800145908 /* ContinueWatchingDM.swift */; }; 52D6A2482C21A3A500145908 /* WebSeriesVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D6A2472C21A3A500145908 /* WebSeriesVM.swift */; }; 52D6A24B2C21B43300145908 /* WebSeriesCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 52D6A24A2C21B43300145908 /* WebSeriesCell.xib */; }; @@ -272,6 +277,8 @@ 523ED27A2BDA2BC900CFED02 /* WOKAUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WOKAUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 523ED27E2BDA2BC900CFED02 /* WOKAUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WOKAUITests.swift; sourceTree = ""; }; 523ED2802BDA2BC900CFED02 /* WOKAUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WOKAUITestsLaunchTests.swift; sourceTree = ""; }; + 5242FE582C24203E0086A86D /* WebSeriesSeasonVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebSeriesSeasonVC.swift; sourceTree = ""; }; + 5242FE5A2C24317A0086A86D /* WebSeriesSeasonVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebSeriesSeasonVM.swift; sourceTree = ""; }; 524C422A2C04781B0016A11C /* ThemeTwoVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemeTwoVM.swift; sourceTree = ""; }; 524C42302C0499560016A11C /* NotificationCenterReloads.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationCenterReloads.swift; sourceTree = ""; }; 524C42322C049D590016A11C /* CustomizableSegmentControl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomizableSegmentControl.swift; sourceTree = ""; }; @@ -315,6 +322,9 @@ 527AC6FB2C173A5100434FB7 /* SongListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SongListCell.swift; sourceTree = ""; }; 527AC6FC2C173A5100434FB7 /* SongListCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SongListCell.xib; sourceTree = ""; }; 527AC7002C182DCE00434FB7 /* TimeStringToSeconds.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeStringToSeconds.swift; sourceTree = ""; }; + 528E5F1A2C24531200E33E4E /* SeasonListingDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SeasonListingDM.swift; sourceTree = ""; }; + 528E5F202C24660F00E33E4E /* SeasonCategoryCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SeasonCategoryCell.swift; sourceTree = ""; }; + 528E5F212C24660F00E33E4E /* SeasonCategoryCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SeasonCategoryCell.xib; sourceTree = ""; }; 529B0DD32C06156B00CFC54B /* LoginNavVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginNavVC.swift; sourceTree = ""; }; 529B0DD52C070C0F00CFC54B /* GuestDataDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuestDataDM.swift; sourceTree = ""; }; 52A3F6A42BECBA8D0000BB0B /* LinkedChildDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkedChildDM.swift; sourceTree = ""; }; @@ -374,6 +384,7 @@ 52CA28FB2BE11A0400708B49 /* UserIntrestVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserIntrestVM.swift; sourceTree = ""; }; 52CC38C22BDF812F00B74C3E /* LocalisedElements.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalisedElements.swift; sourceTree = ""; }; 52CCD7AF2C1AF0F80078BD65 /* RadioVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RadioVC.swift; sourceTree = ""; }; + 52D2F3D72C24043D009E52FF /* ShimmerEffectView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShimmerEffectView.swift; sourceTree = ""; }; 52D6A2452C21A29800145908 /* ContinueWatchingDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContinueWatchingDM.swift; sourceTree = ""; }; 52D6A2472C21A3A500145908 /* WebSeriesVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebSeriesVM.swift; sourceTree = ""; }; 52D6A2492C21B43300145908 /* WebSeriesCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebSeriesCell.swift; sourceTree = ""; }; @@ -470,7 +481,6 @@ files = ( 522A93132C0DB5D50098FE49 /* JWPlayerKit in Frameworks */, 9C1C69FA2C106B290035B2C7 /* RSKPlaceholderTextView in Frameworks */, - 525954512BEB5EB700191286 /* SkeletonView in Frameworks */, 619A5A1BD8BD968ADC83C106 /* Pods_WOKA.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -954,6 +964,7 @@ isa = PBXGroup; children = ( 52DAC64D2C21775300E2F85B /* WebSeriesVC.swift */, + 5242FE582C24203E0086A86D /* WebSeriesSeasonVC.swift */, ); path = Controller; sourceTree = ""; @@ -962,6 +973,7 @@ isa = PBXGroup; children = ( 52D6A2472C21A3A500145908 /* WebSeriesVM.swift */, + 5242FE5A2C24317A0086A86D /* WebSeriesSeasonVM.swift */, ); path = ViewModel; sourceTree = ""; @@ -973,6 +985,8 @@ 52D6A24A2C21B43300145908 /* WebSeriesCell.xib */, 52D6A24F2C22B58200145908 /* WebSeriesShowListingCell.swift */, 52D6A2562C22C1E300145908 /* WebSeriesShowListingCell.xib */, + 528E5F202C24660F00E33E4E /* SeasonCategoryCell.swift */, + 528E5F212C24660F00E33E4E /* SeasonCategoryCell.xib */, ); path = View; sourceTree = ""; @@ -983,6 +997,7 @@ 52D6A2452C21A29800145908 /* ContinueWatchingDM.swift */, 52D6A24D2C22B3AB00145908 /* WebSeriesShowListDM.swift */, 52D6A2532C22B93F00145908 /* CategoryListingDM.swift */, + 528E5F1A2C24531200E33E4E /* SeasonListingDM.swift */, ); path = Model; sourceTree = ""; @@ -1044,6 +1059,7 @@ isa = PBXGroup; children = ( 9C535DB72C0089B400DA6DCD /* ViewButtonAnimation.swift */, + 52D2F3D72C24043D009E52FF /* ShimmerEffectView.swift */, ); path = Animation; sourceTree = ""; @@ -1264,7 +1280,6 @@ ); name = WOKA; packageProductDependencies = ( - 525954502BEB5EB700191286 /* SkeletonView */, 522A93122C0DB5D50098FE49 /* JWPlayerKit */, 9C1C69F92C106B290035B2C7 /* RSKPlaceholderTextView */, ); @@ -1342,7 +1357,6 @@ ); mainGroup = 523ED2512BDA2BC700CFED02; packageReferences = ( - 5259544F2BEB5EB700191286 /* XCRemoteSwiftPackageReference "SkeletonView" */, 522A93112C0DB5D50098FE49 /* XCRemoteSwiftPackageReference "JWPlayerKit-package" */, 9C1C69F82C106B290035B2C7 /* XCRemoteSwiftPackageReference "RSKPlaceholderTextView" */, ); @@ -1362,6 +1376,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 528E5F232C24660F00E33E4E /* SeasonCategoryCell.xib in Resources */, 9C27E1732BDB86B600EC1DA9 /* OnBoardCell.xib in Resources */, 522A931A2C0DE8CC0098FE49 /* SideBarNav.storyboard in Resources */, 9CDCE1452BDB9B9A003FEF11 /* OnBoardMainSound.m4a in Resources */, @@ -1480,6 +1495,7 @@ 525954102BE8B72900191286 /* FontCustom.swift in Sources */, 5202AAFE2BDF90590043B7BD /* TextFieldImage.swift in Sources */, 9C7939152C0F23AA00F5D6E6 /* NsNotificationExtension.swift in Sources */, + 528E5F1B2C24531200E33E4E /* SeasonListingDM.swift in Sources */, 52FDDAB52BF34DC300E037C1 /* YesNoAlertVC.swift in Sources */, 52C6E0232BE3B3E300E22D59 /* SelectAvatarVC.swift in Sources */, 529B0DD62C070C0F00CFC54B /* GuestDataDM.swift in Sources */, @@ -1494,6 +1510,7 @@ 9C27E1602BDB6ECA00EC1DA9 /* UserDefaultsStruct.swift in Sources */, 52A3F6AD2BECC0340000BB0B /* TypeAlias.swift in Sources */, 52D6A24C2C21B43300145908 /* WebSeriesCell.swift in Sources */, + 5242FE5B2C24317A0086A86D /* WebSeriesSeasonVM.swift in Sources */, 524C422B2C04781B0016A11C /* ThemeTwoVM.swift in Sources */, 52B8D4DF2C04A25E00ED65F3 /* StatusBar.swift in Sources */, 5259541D2BE8D94400191286 /* QueueHelper.swift in Sources */, @@ -1516,6 +1533,7 @@ 52BC3BF02C1701F8002FACA6 /* BlogDM.swift in Sources */, 525954192BE8CC3400191286 /* ConstantString.swift in Sources */, 52D774EB2BDFC0BF001D87DE /* OTPVC.swift in Sources */, + 52D2F3D82C24043D009E52FF /* ShimmerEffectView.swift in Sources */, 9C27E16F2BDB866500EC1DA9 /* CellIdentifier.swift in Sources */, 52BC3BF22C170264002FACA6 /* MoreVM.swift in Sources */, 9CBE1B412C0F37B300CA6E61 /* DPDUIView+Extension.swift in Sources */, @@ -1597,6 +1615,7 @@ 52BC3BE22C0E02EE002FACA6 /* FaqVC.swift in Sources */, 52A981D02C1AFEE8000E0BEC /* MyListVM.swift in Sources */, 5272FCE52BDFDC8C000ECB1D /* UserDetailsRegisterVM.swift in Sources */, + 528E5F222C24660F00E33E4E /* SeasonCategoryCell.swift in Sources */, 525954272BE9178F00191286 /* UserDataDM.swift in Sources */, 9C27E1652BDB6FBC00EC1DA9 /* StoryBoardID.swift in Sources */, 52FDBA782BFF23F4009D7AC7 /* TimePeriod.swift in Sources */, @@ -1605,6 +1624,7 @@ 9CB4C5A92C118EF300737C00 /* NavBarColor.swift in Sources */, 525954322BEA39D200191286 /* AddTapGesture.swift in Sources */, 522242682BFC74380085C632 /* TabBarVC.swift in Sources */, + 5242FE592C24203E0086A86D /* WebSeriesSeasonVC.swift in Sources */, 9C27E1722BDB86B600EC1DA9 /* OnBoardCell.swift in Sources */, 529B0DD42C06156B00CFC54B /* LoginNavVC.swift in Sources */, 52A981D72C1B0E27000E0BEC /* FavouriteCell.swift in Sources */, @@ -2050,14 +2070,6 @@ minimumVersion = 4.19.1; }; }; - 5259544F2BEB5EB700191286 /* XCRemoteSwiftPackageReference "SkeletonView" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/Juanpe/SkeletonView.git"; - requirement = { - kind = exactVersion; - version = 1.31.0; - }; - }; 9C1C69F82C106B290035B2C7 /* XCRemoteSwiftPackageReference "RSKPlaceholderTextView" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/ruslanskorb/RSKPlaceholderTextView.git"; @@ -2074,11 +2086,6 @@ package = 522A93112C0DB5D50098FE49 /* XCRemoteSwiftPackageReference "JWPlayerKit-package" */; productName = JWPlayerKit; }; - 525954502BEB5EB700191286 /* SkeletonView */ = { - isa = XCSwiftPackageProductDependency; - package = 5259544F2BEB5EB700191286 /* XCRemoteSwiftPackageReference "SkeletonView" */; - productName = SkeletonView; - }; 9C1C69F92C106B290035B2C7 /* RSKPlaceholderTextView */ = { isa = XCSwiftPackageProductDependency; package = 9C1C69F82C106B290035B2C7 /* XCRemoteSwiftPackageReference "RSKPlaceholderTextView" */; diff --git a/WOKA/Assets/Assets.xcassets/WebSeries/PlayButton.imageset/Contents.json b/WOKA/Assets/Assets.xcassets/WebSeries/PlayButton.imageset/Contents.json new file mode 100644 index 0000000..b779445 --- /dev/null +++ b/WOKA/Assets/Assets.xcassets/WebSeries/PlayButton.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "PlayButton.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "PlayButton@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "PlayButton@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WOKA/Assets/Assets.xcassets/WebSeries/PlayButton.imageset/PlayButton.png b/WOKA/Assets/Assets.xcassets/WebSeries/PlayButton.imageset/PlayButton.png new file mode 100644 index 0000000..effc134 Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/WebSeries/PlayButton.imageset/PlayButton.png differ diff --git a/WOKA/Assets/Assets.xcassets/WebSeries/PlayButton.imageset/PlayButton@2x.png b/WOKA/Assets/Assets.xcassets/WebSeries/PlayButton.imageset/PlayButton@2x.png new file mode 100644 index 0000000..20b5275 Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/WebSeries/PlayButton.imageset/PlayButton@2x.png differ diff --git a/WOKA/Assets/Assets.xcassets/WebSeries/PlayButton.imageset/PlayButton@3x.png b/WOKA/Assets/Assets.xcassets/WebSeries/PlayButton.imageset/PlayButton@3x.png new file mode 100644 index 0000000..446dd93 Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/WebSeries/PlayButton.imageset/PlayButton@3x.png differ diff --git a/WOKA/Assets/Assets.xcassets/WebSeries/ShareImage.imageset/Contents.json b/WOKA/Assets/Assets.xcassets/WebSeries/ShareImage.imageset/Contents.json new file mode 100644 index 0000000..d06dc5b --- /dev/null +++ b/WOKA/Assets/Assets.xcassets/WebSeries/ShareImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "ShareImage.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ShareImage@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ShareImage@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WOKA/Assets/Assets.xcassets/WebSeries/ShareImage.imageset/ShareImage.png b/WOKA/Assets/Assets.xcassets/WebSeries/ShareImage.imageset/ShareImage.png new file mode 100644 index 0000000..54e2510 Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/WebSeries/ShareImage.imageset/ShareImage.png differ diff --git a/WOKA/Assets/Assets.xcassets/WebSeries/ShareImage.imageset/ShareImage@2x.png b/WOKA/Assets/Assets.xcassets/WebSeries/ShareImage.imageset/ShareImage@2x.png new file mode 100644 index 0000000..ef59c64 Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/WebSeries/ShareImage.imageset/ShareImage@2x.png differ diff --git a/WOKA/Assets/Assets.xcassets/WebSeries/ShareImage.imageset/ShareImage@3x.png b/WOKA/Assets/Assets.xcassets/WebSeries/ShareImage.imageset/ShareImage@3x.png new file mode 100644 index 0000000..ff39331 Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/WebSeries/ShareImage.imageset/ShareImage@3x.png differ diff --git a/WOKA/Assets/Assets.xcassets/WebSeries/WebSeriesSeasonsBackground.imageset/Contents.json b/WOKA/Assets/Assets.xcassets/WebSeries/WebSeriesSeasonsBackground.imageset/Contents.json new file mode 100644 index 0000000..1e8d898 --- /dev/null +++ b/WOKA/Assets/Assets.xcassets/WebSeries/WebSeriesSeasonsBackground.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Modal1.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WOKA/Assets/Assets.xcassets/WebSeries/WebSeriesSeasonsBackground.imageset/Modal1.png b/WOKA/Assets/Assets.xcassets/WebSeries/WebSeriesSeasonsBackground.imageset/Modal1.png new file mode 100644 index 0000000..b3d5dea Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/WebSeries/WebSeriesSeasonsBackground.imageset/Modal1.png differ diff --git a/WOKA/Authentication/Controller/UserIntrestVC.swift b/WOKA/Authentication/Controller/UserIntrestVC.swift index 4f10726..f85e96b 100644 --- a/WOKA/Authentication/Controller/UserIntrestVC.swift +++ b/WOKA/Authentication/Controller/UserIntrestVC.swift @@ -190,7 +190,9 @@ extension UIView { func startShimmeringViewAnimation() { let gradientLayer = CAGradientLayer() - gradientLayer.frame = bounds +// gradientLayer.frame = bounds + gradientLayer.frame = CGRect(x: -bounds.width, y: 0, width: 3 * bounds.width, height: bounds.height) + gradientLayer.startPoint = CGPoint(x: 0.0, y: 1.0) gradientLayer.endPoint = CGPoint(x: 1.0, y: 1.0) let gradientColorOne = #colorLiteral(red: 0.7529411765, green: 0.7529411765, blue: 0.7529411765, alpha: 1).cgColor diff --git a/WOKA/Authentication/ViewModel/UserDetailsRegisterVM.swift b/WOKA/Authentication/ViewModel/UserDetailsRegisterVM.swift index 741f682..d5ea9a8 100644 --- a/WOKA/Authentication/ViewModel/UserDetailsRegisterVM.swift +++ b/WOKA/Authentication/ViewModel/UserDetailsRegisterVM.swift @@ -37,7 +37,7 @@ class UserDetailsRegisterVM{ vc.enterUserNameTF.addRightButton(title: "", tintColor: UIColor.red, btnImage: UIImage(systemName: "exclamationmark.circle.fill"), target: self, action: #selector(errorUserName)) vc.enterUserNameTF.rightView?.isHidden = true - if let createChildAccount{ // this is from the home screen when a parent can adda child + if createChildAccount != nil{ // this is from the home screen when a parent can adda child vc.dontSharePassLabel.isHidden = true vc.viewTitleLabel.text = "Add Child Account".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue) vc.userNameTitleLabel.text = "USERNAME".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue) diff --git a/WOKA/Constants K/CellIdentifier.swift b/WOKA/Constants K/CellIdentifier.swift index 42786dc..38f107a 100644 --- a/WOKA/Constants K/CellIdentifier.swift +++ b/WOKA/Constants K/CellIdentifier.swift @@ -41,6 +41,7 @@ extension K{ struct WebSeries{ static let webSeriesCell = "WebSeriesCell" static let webSeriesShowListingCell = "WebSeriesShowListingCell" + static let seasonCategoryCell = "SeasonCategoryCell" } } } diff --git a/WOKA/Constants K/StoryBoardID.swift b/WOKA/Constants K/StoryBoardID.swift index ddc4b6d..bac3f99 100644 --- a/WOKA/Constants K/StoryBoardID.swift +++ b/WOKA/Constants K/StoryBoardID.swift @@ -62,6 +62,7 @@ extension K{ struct WebSeries{ static let webSeriesVC = "WebSeriesVC" + static let webSeriesSeasonVC = "WebSeriesSeasonVC" } } } diff --git a/WOKA/Helpers/Animation/ShimmerEffectView.swift b/WOKA/Helpers/Animation/ShimmerEffectView.swift new file mode 100644 index 0000000..3465fe3 --- /dev/null +++ b/WOKA/Helpers/Animation/ShimmerEffectView.swift @@ -0,0 +1,86 @@ +// +// ShimmerEffectView.swift +// WOKA +// +// Created by MacBook Pro on 20/06/24. +// + +import UIKit + +class ShimmerEffectView: UIView { + + var gradientColorOne: CGColor = UIColor(red: 0.176, green: 0.012, blue: 0.561, alpha: 1.0).cgColor + var gradientColorTwo: CGColor = UIColor(white: 0.925, alpha: 1.0).cgColor + + private var gradientLayer: CAGradientLayer? + + override init(frame: CGRect) { + super.init(frame: frame) + commonInit() + } + + required init?(coder: NSCoder) { + super.init(coder: coder) + commonInit() + } + + private func commonInit() { + self.clipsToBounds = true + } + + private func addGradientLayer() -> CAGradientLayer { + let gradientLayer = CAGradientLayer() + + gradientLayer.frame = self.bounds + + // Calculate points for a 70-degree angle (slant) + let angleInRadians = CGFloat(70) * .pi / 180.0 // Convert degrees to radians + + let startPointX = sin(angleInRadians) + let startPoint = CGPoint(x: -startPointX, y: 1.0) + + let endPointX = cos(angleInRadians) + let endPoint = CGPoint(x: 1.0 + endPointX, y: 1.0) + + gradientLayer.startPoint = startPoint + gradientLayer.endPoint = endPoint + gradientLayer.colors = [gradientColorOne, gradientColorTwo, gradientColorOne] + gradientLayer.locations = [0.0, 0.5, 1.0] + self.layer.addSublayer(gradientLayer) + + return gradientLayer + } + + private func addAnimation() -> CABasicAnimation { + let animation = CABasicAnimation(keyPath: "locations") + + // Adjust fromValue and toValue for a 70-degree angle (slant) + animation.fromValue = [-1.0, -0.5, 0.0] + animation.toValue = [1.0, 1.5, 2.0] + + animation.repeatCount = .infinity + animation.duration = 1.2 + return animation + } + + func startShimmer() { + let gradientLayer = addGradientLayer() + let animation = addAnimation() + + gradientLayer.add(animation, forKey: animation.keyPath) + self.gradientLayer = gradientLayer + } + + func stopShimmer() { + guard let gradientLayer = self.gradientLayer else { return } + + gradientLayer.removeAllAnimations() + gradientLayer.removeFromSuperlayer() + self.gradientLayer = nil + } + + override func layoutSubviews() { + super.layoutSubviews() + gradientLayer?.frame = self.bounds + } +} diff --git a/WOKA/Helpers/DropDown/helpers/DPDUIView+Extension.swift b/WOKA/Helpers/DropDown/helpers/DPDUIView+Extension.swift index f29705d..7f750d5 100644 --- a/WOKA/Helpers/DropDown/helpers/DPDUIView+Extension.swift +++ b/WOKA/Helpers/DropDown/helpers/DPDUIView+Extension.swift @@ -40,7 +40,7 @@ internal extension UIView { internal extension UIWindow { static func visibleWindow() -> UIWindow? { - var currentWindow = UIApplication.shared.keyWindow + var currentWindow = UIApplication.shared.keyWindowInConnectedScenes if currentWindow == nil { let frontToBackWindows = Array(UIApplication.shared.windows.reversed()) diff --git a/WOKA/Helpers/LoadingIndicatorImageView.swift b/WOKA/Helpers/LoadingIndicatorImageView.swift index 8e563dd..0c41ead 100644 --- a/WOKA/Helpers/LoadingIndicatorImageView.swift +++ b/WOKA/Helpers/LoadingIndicatorImageView.swift @@ -27,6 +27,7 @@ extension UIImageView { self.addSubview(activityIndicator) // Timer.scheduledTimer(withTimeInterval: 1.5, repeats: false) { _ in + self.sd_setImage(with: URL(string: url.replacingOccurrences(of: " ", with: "%20"))) { (image, error, cacheType, url) in activityIndicator.stopAnimating() } diff --git a/WOKA/Home/Controller/MyListVC.swift b/WOKA/Home/Controller/MyListVC.swift index b2bf10d..c8aa734 100644 --- a/WOKA/Home/Controller/MyListVC.swift +++ b/WOKA/Home/Controller/MyListVC.swift @@ -204,7 +204,7 @@ extension MyListVC : CollectionViewSRC{ } } case .liked: - guard let isLiked = data.isLiked ,let postID = data.id,let postType = data.contentMoreDetails?.first?.postType,let categoryID = data.bookmarkCategoryIDS else{return} + guard let isLiked = data.isLiked ,let postID = data.id,let postType = data.contentMoreDetails?.first?.postType else{return} if isLiked{ vm.unlikePost(postID: postID, postType: postType, index: index) { [unowned self] isDone in if isDone{ diff --git a/WOKA/Home/ViewModel/MyListVM.swift b/WOKA/Home/ViewModel/MyListVM.swift index b719afe..e710cf3 100644 --- a/WOKA/Home/ViewModel/MyListVM.swift +++ b/WOKA/Home/ViewModel/MyListVM.swift @@ -83,20 +83,27 @@ class MyListVM{ */ webSeriesHindi = hindiData.compactMap { $0 }.filter { ($0.bookmarkCategoryIDS?.components(separatedBy: ",").first == "18" || $0.bookmarkCategoryIDS?.components(separatedBy: ",").last == "18") } - // Deleting the hindi series from main (those with category ID "18") - for (index, element) in favListingData!.showData!.enumerated() { - let bookMarkCatID = element.bookmarkCategoryIDS?.components(separatedBy: ",") + if let data = favListingData?.showData{ + var indicesToRemove = [Int]() + + // Deleting the hindi series from main (those with category ID "18") + for (index, element) in data.enumerated() { + if let bookMarkCatID = element.bookmarkCategoryIDS?.components(separatedBy: ","){ + if bookMarkCatID.count > 1{ + hindiData[index].bookmarkCategoryIDS = "1" + }else{ + indicesToRemove.append(index) + } + } + } - if bookMarkCatID?.count == 2{ - hindiData[index-1].bookmarkCategoryIDS = "1" - }else{ - - hindiData.remove(at: index-1) + // Remove items in reverse order to avoid index shifting issues + for index in indicesToRemove.reversed() { + hindiData.remove(at: index) } } -// hindiData.removeAll { $0.bookmarkCategoryIDS?.components(separatedBy: ",").count == 1 ? $0.bookmarkCategoryIDS? } - + // Updating the showData with the filtered list favListingData?.showData = hindiData } diff --git a/WOKA/Localized Module/hi.lproj/Localizable.strings b/WOKA/Localized Module/hi.lproj/Localizable.strings index 41e2a50..9b81087 100644 --- a/WOKA/Localized Module/hi.lproj/Localizable.strings +++ b/WOKA/Localized Module/hi.lproj/Localizable.strings @@ -215,3 +215,10 @@ "Karaoke" = "कराओके"; "Games" = "खेल"; + +/* + Web Series + */ + +"Select Video Language" = "वीडियो भाषा चुनें"; +"TRAILER" = "ट्रेलर"; diff --git a/WOKA/Network Adapter/APIEndPoints.swift b/WOKA/Network Adapter/APIEndPoints.swift index 4ecd872..91e95da 100644 --- a/WOKA/Network Adapter/APIEndPoints.swift +++ b/WOKA/Network Adapter/APIEndPoints.swift @@ -83,6 +83,7 @@ struct APIEndPoints { static let continue_watching = makeURL(path: "continue_watching") static let watch_show_listing = makeURL(path: "watch_show_listing") static let category_listing = makeURL(path: "category_listing") + static let season_listing = makeURL(path: "season_listing") } // Other endpoint categories... diff --git a/WOKA/WebSeries/Controller/WebSeriesSeasonVC.swift b/WOKA/WebSeries/Controller/WebSeriesSeasonVC.swift new file mode 100644 index 0000000..317ac84 --- /dev/null +++ b/WOKA/WebSeries/Controller/WebSeriesSeasonVC.swift @@ -0,0 +1,158 @@ +// +// WebSeriesSeasonVC.swift +// WOKA +// +// Created by MacBook Pro on 20/06/24. +// + +import UIKit + +class WebSeriesSeasonVC: UIViewController { + + var vm = WebSeriesSeasonVM() + + @IBOutlet weak var seasonImage: UIImageView! + @IBOutlet weak var seasonTitle: UILabel! + @IBOutlet weak var seasonDate: UILabel! + @IBOutlet weak var seasonEpisodes: UILabel! + @IBOutlet weak var seasonMediaType: UILabel! + @IBOutlet weak var seasonDesc: UILabel! + + @IBOutlet weak var categoryCV: UICollectionView! + + override func viewDidLoad() { + super.viewDidLoad() + vm.vc = self + vm.initView() + + 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) + } + + + @IBAction func watchBtnTapped(_ sender: LocalisedElementsButton) { + } + + @IBAction func btnTapped(_ sender: LocalisedElementsButton) { + + } +} + +// MARK: - CollectionView Delegate + +extension WebSeriesSeasonVC : CollectionViewSRC{ + + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + return vm.seasonListingData.count + } + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: K.CellIdentifier.WebSeries.seasonCategoryCell, for: indexPath) as! SeasonCategoryCell + + let data = vm.seasonListingData[indexPath.row] + cell.setData(title: data.seasonNumber ?? "Season", iselected: indexPath.row == vm.selectedCateogory) + return cell + } + + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + print(indexPath.row) + } +} + +// MARK: - Collection Flow Layout + +extension WebSeriesSeasonVC : UICollectionViewDelegateFlowLayout{ + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { + // Generate a random string for testing purposes + let randomText = vm.seasonListingData[indexPath.row].seasonNumber! + + // Define the font for the text + let font = FontCustom.shareInstance.customFont(fontName: .Exo2_Bold, size: 18) // You can adjust the font size as needed + + // Calculate the width of the text + let textWidth = randomText.size(withAttributes: [.font: font]).width + + // Set the cell width based on the text width and any additional padding + let cellWidth = textWidth + 25 // Add any additional spacing you want + + return CGSize(width: cellWidth, height: 50) + } + + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat { + section == 0 ? 15 : 5 + } + + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { + UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10) + } + +} + +// Helper method to calculate text width +extension String { + func width(withConstrainedHeight height: CGFloat, font: UIFont) -> CGFloat { + let constraintRect = CGSize(width: .greatestFiniteMagnitude, height: height) + let boundingBox = self.boundingRect(with: constraintRect, options: .usesLineFragmentOrigin, attributes: [.font: font], context: nil) + return ceil(boundingBox.width) + } +} + +@IBDesignable +class VerticalButton: UIButton { + + @IBInspectable public var padding: CGFloat = 20.0 { + didSet { + setNeedsLayout() + } + } + + override var intrinsicContentSize: CGSize { + let maxSize = CGSize(width: CGFloat.greatestFiniteMagnitude, height: CGFloat.greatestFiniteMagnitude) + + if let titleSize = titleLabel?.sizeThatFits(maxSize), let imageSize = imageView?.sizeThatFits(maxSize) { + let width = ceil(max(imageSize.width, titleSize.width)) + let height = ceil(imageSize.height + titleSize.height + padding) + + return CGSize(width: width, height: height) + } + + return super.intrinsicContentSize + } + + override func layoutSubviews() { + if let image = imageView?.image, let title = titleLabel?.attributedText { + let imageSize = image.size + let titleSize = title.size() + + if effectiveUserInterfaceLayoutDirection == .leftToRight { + titleEdgeInsets = UIEdgeInsets(top: 0.0, left: -imageSize.width, bottom: -(imageSize.height + padding), right: 0.0) + imageEdgeInsets = UIEdgeInsets(top: -(titleSize.height + padding), left: 0.0, bottom: 0.0, right: -titleSize.width) + } + else { + titleEdgeInsets = UIEdgeInsets(top: 0.0, left: 0.0, bottom: -(imageSize.height + padding), right: -imageSize.width) + imageEdgeInsets = UIEdgeInsets(top: -(titleSize.height + padding), left: -titleSize.width, bottom: 0.0, right: 0.0) + } + } + + super.layoutSubviews() + } + +} diff --git a/WOKA/WebSeries/Controller/WebSeriesVC.swift b/WOKA/WebSeries/Controller/WebSeriesVC.swift index 178a323..0e9cc46 100644 --- a/WOKA/WebSeries/Controller/WebSeriesVC.swift +++ b/WOKA/WebSeries/Controller/WebSeriesVC.swift @@ -9,7 +9,11 @@ import UIKit class WebSeriesVC: UIViewController { - @IBOutlet weak var headerView: UIView! + @IBOutlet weak var headerView: ShimmerEffectView! + @IBOutlet weak var masilaTrailerView: ShimmerEffectView! + + @IBOutlet weak var videoLanguageView: ShimmerEffectView! + @IBOutlet weak var topLabel: UILabel! @IBOutlet weak var scrollView: UIScrollView! @IBOutlet weak var headerViewTopConstraint: NSLayoutConstraint! @@ -23,6 +27,8 @@ class WebSeriesVC: UIViewController { @IBOutlet weak var showListingTableView: UITableView! @IBOutlet weak var tableHeight: NSLayoutConstraint! + @IBOutlet weak var continueWatchingStack: UIStackView! + var vm = WebSeriesVM() override func viewDidLoad() { @@ -66,15 +72,20 @@ class WebSeriesVC: UIViewController { extension WebSeriesVC : TableViewSRC{ func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return vm.showData.count + return vm.showData.count == 0 ? 2 : vm.showData.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: K.CellIdentifier.WebSeries.webSeriesShowListingCell) as! WebSeriesShowListingCell - let data = vm.showData[indexPath.row] - let categoryID = vm.categoryListingData[vm.dropDownModule.indexForSelectedRow ?? 0].id ?? 0 - cell.setData(data: data,selectedCategory: categoryID) + if vm.showData.count == 0{ + cell.showShimmer() + }else{ + let data = vm.showData[indexPath.row] + let categoryID = vm.categoryListingData[vm.dropDownModule.indexForSelectedRow ?? 0].id ?? 0 + cell.setData(data: data,selectedCategory: categoryID) + cell.stopShimmer() + } cell.btnTapped = { [self] (type) -> Void in updateFavLikes(type: type, index: indexPath.row) @@ -179,7 +190,17 @@ extension WebSeriesVC : TableViewSRC{ } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { - print(indexPath.row) + 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.watchShowID = showData.id + if let selectedIndex = vm.dropDownModule.indexForSelectedRow{ + let categoryID = vm.categoryListingData[selectedIndex] + vcPush.vm.categoryID = categoryID.id + } + self.navigationController?.pushViewController(vcPush, animated: true) } } diff --git a/WOKA/WebSeries/Model/SeasonListingDM.swift b/WOKA/WebSeries/Model/SeasonListingDM.swift new file mode 100644 index 0000000..fedaf3a --- /dev/null +++ b/WOKA/WebSeries/Model/SeasonListingDM.swift @@ -0,0 +1,71 @@ +// +// SeasonListingDM.swift +// WOKA +// +// Created by MacBook Pro on 20/06/24. +// + + +import Foundation + +// MARK: - SeasonListingDM +struct SeasonListingDM: Codable { + let result: [Result]? + let totalRecords: Int? + + enum CodingKeys: String, CodingKey { + case result + case totalRecords = "total_records" + } + + // MARK: - Result + struct Result: Codable { + let id, watchShowsMasterID: Int? + let categoryMasterID, seasonNumber: String? + let noOfEpisodes: Int? + let seasonDescription: String? + let releaseYear: Int? + let seasonTitle: String? + let trailerURL: String? + let thumbnailPath: String? + let thumbnailImgURL: String? + let tagsKeyword, releaseDate, mediaType: String? + let seasonMoreDetails: [SeasonMoreDetail]? + + enum CodingKeys: String, CodingKey { + case id + case watchShowsMasterID = "watch_shows_master_id" + case categoryMasterID = "category_master_id" + case seasonNumber = "season_number" + case noOfEpisodes = "no_of_episodes" + case seasonDescription = "season_description" + case releaseYear = "release_year" + case seasonTitle = "season_title" + case trailerURL = "trailer_url" + case thumbnailPath = "thumbnail_path" + case thumbnailImgURL = "thumbnail_img_url" + case tagsKeyword = "tags_keyword" + case releaseDate = "release_date" + case mediaType = "media_type" + case seasonMoreDetails = "season_more_details" + } + } + + // MARK: - SeasonMoreDetail + struct SeasonMoreDetail: Codable { + let id, contentID, postType, languageMasterID: Int? + let title, description, tagsKeywords: String? + let trailerHDURL, trailerSDURL: 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 trailerHDURL = "trailer_hd_url" + case trailerSDURL = "trailer_sd_url" + } + } +} diff --git a/WOKA/WebSeries/View/SeasonCategoryCell.swift b/WOKA/WebSeries/View/SeasonCategoryCell.swift new file mode 100644 index 0000000..3c9a645 --- /dev/null +++ b/WOKA/WebSeries/View/SeasonCategoryCell.swift @@ -0,0 +1,38 @@ +// +// SeasonCategoryCell.swift +// WOKA +// +// Created by MacBook Pro on 20/06/24. +// + +import UIKit + +class SeasonCategoryCell: UICollectionViewCell { + + @IBOutlet weak var categoryTitle: UILabel! + @IBOutlet weak var outerView: UIView! + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + } + + override func layoutSubviews() { + outerView.roundCorner() + } + + func setData(title : String , iselected : Bool){ + self.categoryTitle.text = title + selectDeselect(isSelected: iselected) + } + + func selectDeselect(isSelected : Bool){ + if isSelected{ + outerView.backgroundColor = #colorLiteral(red: 0.4495816827, green: 0.2344398499, blue: 0.8120074868, alpha: 1) + categoryTitle.textColor = .white + }else{ + outerView.backgroundColor = #colorLiteral(red: 1, green: 1, blue: 1, alpha: 1) + categoryTitle.textColor = .black + } + } +} diff --git a/WOKA/WebSeries/View/SeasonCategoryCell.xib b/WOKA/WebSeries/View/SeasonCategoryCell.xib new file mode 100644 index 0000000..cf43827 --- /dev/null +++ b/WOKA/WebSeries/View/SeasonCategoryCell.xib @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WOKA/WebSeries/View/WebSeriesShowListingCell.swift b/WOKA/WebSeries/View/WebSeriesShowListingCell.swift index 3cf6cf8..7da4c1a 100644 --- a/WOKA/WebSeries/View/WebSeriesShowListingCell.swift +++ b/WOKA/WebSeries/View/WebSeriesShowListingCell.swift @@ -14,6 +14,7 @@ class WebSeriesShowListingCell: UITableViewCell { @IBOutlet weak var totalLikes: UILabel! @IBOutlet weak var likeBtn: UIButton! @IBOutlet weak var favBtn: UIButton! + @IBOutlet weak var shimmerView: ShimmerEffectView! typealias btnTappedBlock = ( _ from : FavCellCLick) -> Void // 0 - plus 1 - minus var btnTapped : btnTappedBlock! @@ -22,7 +23,15 @@ class WebSeriesShowListingCell: UITableViewCell { super.awakeFromNib() // Initialization code } - + + func showShimmer(){ + shimmerView.startShimmer() + } + + func stopShimmer(){ + shimmerView.stopShimmer() + } + func setData(data : WebSeriesShowListDM.ShowDatum, selectedCategory : Int){ //heart.fill , heart , hand.thumbsup.fill , hand.thumbsup if AuthFunc.shareInstance.getDefaultLanguage() == .english{ @@ -69,8 +78,6 @@ class WebSeriesShowListingCell: UITableViewCell { // // } } - - } @IBAction func btnTapped(_ sender: UIButton) { diff --git a/WOKA/WebSeries/View/WebSeriesShowListingCell.xib b/WOKA/WebSeries/View/WebSeriesShowListingCell.xib index d72afa0..336a46a 100644 --- a/WOKA/WebSeries/View/WebSeriesShowListingCell.xib +++ b/WOKA/WebSeries/View/WebSeriesShowListingCell.xib @@ -24,98 +24,110 @@ - - + + - - - - - - - - - - - - - - + + - - - + + + + + + + + + + + + + + - - + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - + + - - + + + + + + + - + - - - - + + + + @@ -123,6 +135,7 @@ + diff --git a/WOKA/WebSeries/ViewModel/WebSeriesSeasonVM.swift b/WOKA/WebSeries/ViewModel/WebSeriesSeasonVM.swift new file mode 100644 index 0000000..062360e --- /dev/null +++ b/WOKA/WebSeries/ViewModel/WebSeriesSeasonVM.swift @@ -0,0 +1,102 @@ +// +// WebSeriesSeasonVM.swift +// WOKA +// +// Created by MacBook Pro on 20/06/24. +// + +import Foundation +import Alamofire + +class WebSeriesSeasonVM{ + + weak var vc : WebSeriesSeasonVC! + + var watchShowID : Int? + var categoryID : Int? + + var selectedCateogory = 0 + + var seasonListingData = [SeasonListingDM.Result]() + + func initView(){ + getSeasonListing() + setupCell() + } + + func setupCell(){ + vc.categoryCV.register(UINib(nibName: K.CellIdentifier.WebSeries.seasonCategoryCell, bundle: nil), forCellWithReuseIdentifier: K.CellIdentifier.WebSeries.seasonCategoryCell) + vc.categoryCV.delegate = vc.self + vc.categoryCV.dataSource = vc.self + } + + // MARK: - Api Calls + + func getSeasonListing(){ + Utilities.startProgressHUD() + guard let watchShowID, let categoryID else{return} + let headers : HTTPHeaders = ["access-token" : AuthFunc.shareInstance.getAccessToken()] + let params : Parameters = ["watch_show_id" : watchShowID, + "category_id" : categoryID] + NetworkManager.shareInstance.apiRequest(url: APIEndPoints.WebSeries.season_listing, method: .post,parameters: params,headers : headers) { [weak self](result : Result, 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?.result else{return} + self.seasonListingData = data + setSeasonData() + self.vc.categoryCV.reloadData() + default: + break + } + case .failure(let error): + guard let self else{ + Utilities.dismissProgressHUD() + return + } + Utilities.dismissProgressHUD() + vc.toast(msg: error.localizedDescription , time: 2) + } + } + } + + func setSeasonData(){ + guard let data = seasonListingData.first else{return} + vc.seasonImage.imageURL(data.thumbnailPath!, color: UIColor.appColor(.TextDarkBlue)!) + + if AuthFunc.shareInstance.getDefaultLanguage() == .english{ + let englishData = data.seasonMoreDetails?.filter({$0.languageMasterID == 1}).first + vc.seasonTitle.text = englishData?.title + + if let desc = englishData?.description?.replacingOccurrences(of: "
", with: "").htmlToAttributedString{ + let sizeText = NSMutableAttributedString(attributedString: desc) + sizeText.setFontFace(font: FontCustom.shareInstance.customFont(fontName: .Exo2_Regular, size: 15),color: UIColor.appColor(.TextDarkBlue)!) + self.vc.seasonDesc.attributedText = sizeText + } + }else{ + let hindiData = data.seasonMoreDetails?.filter({$0.languageMasterID == 2}).first + vc.seasonTitle.text = hindiData?.title + if let desc = hindiData?.description?.replacingOccurrences(of: "
", with: "").htmlToAttributedString{ + let sizeText = NSMutableAttributedString(attributedString: desc) + sizeText.setFontFace(font: FontCustom.shareInstance.customFont(fontName: .Exo2_Regular, size: 15),color: UIColor.appColor(.TextDarkBlue)!) + self.vc.seasonDesc.attributedText = sizeText + } + } + + vc.seasonDate.text = data.releaseYear?.toString() + vc.seasonEpisodes.text = data.noOfEpisodes?.toString() + vc.seasonMediaType.text = data.mediaType + } +} diff --git a/WOKA/WebSeries/ViewModel/WebSeriesVM.swift b/WOKA/WebSeries/ViewModel/WebSeriesVM.swift index 3a85dbf..c93dd0f 100644 --- a/WOKA/WebSeries/ViewModel/WebSeriesVM.swift +++ b/WOKA/WebSeries/ViewModel/WebSeriesVM.swift @@ -13,12 +13,20 @@ class WebSeriesVM{ weak var vc : WebSeriesVC! var continueWatchingData = [ContinueWatchingDM.ResultData]() var categoryListingData = [CategoryListingDM.ResultData]() + var showData = [WebSeriesShowListDM.ShowDatum]() let dropDownModule = DropDown() var dataSource = [String]() func initView(){ + setupCell() + self.vc.tableHeight.constant = self.vc.showListingTableView.contentSize.height + 100 + self.vc.showListingTableView.layoutIfNeeded() + self.vc.tableHeight.constant = self.vc.showListingTableView.contentSize.height + + startShimmer() + vc.scrollView.indicatorStyle = .white // or .white let color1 = #colorLiteral(red: 0.5921568627, green: 0.2588235294, blue: 0.8941176471, alpha: 1) @@ -31,14 +39,25 @@ class WebSeriesVM{ getCategoryListing() // for the first load always send hindi as it is default category - getShowListing(categoryID: 18) + self.getShowListing(categoryID: 18) vc.languageStack.addTapGesture { [weak self] in guard let self else {return} dropDownModule.show() self.vc.expandBtn.setImage(UIImage(named: "SupportUpArrow"), for: .normal) } - setupCell() + } + + func startShimmer(){ + vc.headerView.startShimmer() + vc.masilaTrailerView.startShimmer() + vc.videoLanguageView.startShimmer() + } + + func stopShimmer(){ + self.vc.headerView.stopShimmer() + self.vc.masilaTrailerView.stopShimmer() + self.vc.videoLanguageView.stopShimmer() } func setupCell(){ @@ -69,6 +88,13 @@ class WebSeriesVM{ dropDownModule.selectionBackgroundColor = UIColor.appColor(.TextDarkBlue)! dropDownModule.selectedTextColor = .white dropDownModule.selectRow(at: 0) + + // handle if user clicks outside + dropDownModule.cancelAction = { [weak self] in + guard let self else{return} + vc.expandBtn.setImage(UIImage(named: "SupportBottomArrow"), for: .normal) + } + dropDownModule.selectionAction = { [weak self] (index: Int, item: String) in guard let self else{return} vc.languageLabel.text = item @@ -84,9 +110,8 @@ class WebSeriesVM{ // MARK: - Api Calls func getContinueWatching(){ - Utilities.startProgressHUD() -// let headers : HTTPHeaders = ["access-token" : AuthFunc.shareInstance.getAccessToken()] - let headers : HTTPHeaders = ["access-token" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3dva2FsYW5kLmNvbS9hZG1pbi9hcGkvbG9naW5fcHJvY2VlZCIsImlhdCI6MTcxODcxNTk4OSwiZXhwIjoxNzUwMjUxOTg5LCJuYmYiOjE3MTg3MTU5ODksImp0aSI6Ilh1QzVIdjY1RkcwQ1hqUkYiLCJzdWIiOiIyMTYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.w8AfPv_6WUoDiBRcJzHz036qhaxfw_R9Gcb2C2wGLvs"] +// Utilities.startProgressHUD() + let headers : HTTPHeaders = ["access-token" : AuthFunc.shareInstance.getAccessToken()] let params : Parameters = ["post_type" : 3] // 3- webseries NetworkManager.shareInstance.apiRequest(url: APIEndPoints.WebSeries.continue_watching, method: .post,parameters: params,headers : headers) { [weak self](result : Result, NetworkManager.APIError>) in switch result{ @@ -101,10 +126,16 @@ class WebSeriesVM{ Error */ Utilities.dismissProgressHUD() - vc.toast(msg: data.message ?? "Unrecognised error" , time: 2) +// vc.toast(msg: data.message ?? "Unrecognised error" , time: 2) + self.vc.continueWatchingStack.isHidden = true case 1: Utilities.dismissProgressHUD() guard let data = data.data?.result else{return} + if data.count == 0{ + self.vc.continueWatchingStack.isHidden = true + }else{ + self.vc.continueWatchingStack.isHidden = false + } self.continueWatchingData = data self.vc.continueWatchingCV.reloadData() default: @@ -116,13 +147,14 @@ class WebSeriesVM{ return } Utilities.dismissProgressHUD() + self.vc.continueWatchingStack.isHidden = true vc.toast(msg: error.localizedDescription , time: 2) } } } func getShowListing(categoryID : Int){ - Utilities.startProgressHUD() +// Utilities.startProgressHUD() let headers : HTTPHeaders = ["access-token" : AuthFunc.shareInstance.getAccessToken()] let params : Parameters = ["category_id" : categoryID] // from category listing api , default will be 1 NetworkManager.shareInstance.apiRequest(url: APIEndPoints.WebSeries.watch_show_listing, method: .post,parameters: params,headers: headers) { [weak self](result : Result, NetworkManager.APIError>) in @@ -147,7 +179,9 @@ class WebSeriesVM{ self.vc.showListingTableView.reloadData() self.vc.tableHeight.constant = self.vc.showListingTableView.contentSize.height + 100 self.vc.showListingTableView.layoutIfNeeded() - self.vc.tableHeight.constant = self.vc.showListingTableView.contentSize.height + self.vc.tableHeight.constant = self.vc.showListingTableView.contentSize.height + + self.stopShimmer() default: break } @@ -163,7 +197,7 @@ class WebSeriesVM{ } func getCategoryListing(){ - Utilities.startProgressHUD() +// Utilities.startProgressHUD() let headers : HTTPHeaders = ["access-token" : AuthFunc.shareInstance.getAccessToken()] let params : Parameters = ["module_id" : 7] // 7 - webseries NetworkManager.shareInstance.apiRequest(url: APIEndPoints.WebSeries.category_listing, method: .post,parameters: params,headers : headers) { [weak self](result : Result, NetworkManager.APIError>) in diff --git a/WOKA/WebSeries/WebSeries.storyboard b/WOKA/WebSeries/WebSeries.storyboard index 16891c0..4f5de6e 100644 --- a/WOKA/WebSeries/WebSeries.storyboard +++ b/WOKA/WebSeries/WebSeries.storyboard @@ -6,12 +6,19 @@ + Exo2-Bold + + Exo2-Medium + + + Exo2-Regular + @@ -22,7 +29,7 @@ - + @@ -37,49 +44,64 @@ + + + - - + + - - + + + + + + + - + + + + + + + + - + - + - - + - - + + - - - + + - - + + + - - + + + + + + + + + + + + + + - - - - - - - + + + - - - - + + + + + + + + - + - - - - - - - - - - - - @@ -220,29 +234,365 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + +