From 95495dc414f9dbed4f78b7ecf1cd7674add573c2 Mon Sep 17 00:00:00 2001 From: BilalKhanWDI Date: Thu, 20 Jun 2024 19:51:39 +0530 Subject: [PATCH] - Added native shimmer effect. - Updated my list for handling the comma separated language. - Added shimmer to manila , language , list table - Added action for dropdown, if user clicks outside the dropdown it ill dismiss and change the arrow direction - Handled shimmer with api call, removed the progress hud - Updated Lingual file for webSeries VC --- WOKA.xcodeproj/project.pbxproj | 41 +- .../PlayButton.imageset/Contents.json | 23 + .../PlayButton.imageset/PlayButton.png | Bin 0 -> 1394 bytes .../PlayButton.imageset/PlayButton@2x.png | Bin 0 -> 3091 bytes .../PlayButton.imageset/PlayButton@3x.png | Bin 0 -> 1768 bytes .../ShareImage.imageset/Contents.json | 23 + .../ShareImage.imageset/ShareImage.png | Bin 0 -> 596 bytes .../ShareImage.imageset/ShareImage@2x.png | Bin 0 -> 1276 bytes .../ShareImage.imageset/ShareImage@3x.png | Bin 0 -> 852 bytes .../Contents.json | 21 + .../Modal1.png | Bin 0 -> 2813 bytes .../Controller/UserIntrestVC.swift | 4 +- .../ViewModel/UserDetailsRegisterVM.swift | 2 +- WOKA/Constants K/CellIdentifier.swift | 1 + WOKA/Constants K/StoryBoardID.swift | 1 + .../Helpers/Animation/ShimmerEffectView.swift | 86 +++ .../helpers/DPDUIView+Extension.swift | 2 +- WOKA/Helpers/LoadingIndicatorImageView.swift | 1 + WOKA/Home/Controller/MyListVC.swift | 2 +- WOKA/Home/ViewModel/MyListVM.swift | 27 +- .../hi.lproj/Localizable.strings | 7 + WOKA/Network Adapter/APIEndPoints.swift | 1 + .../Controller/WebSeriesSeasonVC.swift | 158 +++++ WOKA/WebSeries/Controller/WebSeriesVC.swift | 33 +- WOKA/WebSeries/Model/SeasonListingDM.swift | 71 +++ WOKA/WebSeries/View/SeasonCategoryCell.swift | 38 ++ WOKA/WebSeries/View/SeasonCategoryCell.xib | 56 ++ .../View/WebSeriesShowListingCell.swift | 13 +- .../View/WebSeriesShowListingCell.xib | 159 ++--- .../ViewModel/WebSeriesSeasonVM.swift | 102 ++++ WOKA/WebSeries/ViewModel/WebSeriesVM.swift | 52 +- WOKA/WebSeries/WebSeries.storyboard | 556 ++++++++++++++---- 32 files changed, 1255 insertions(+), 225 deletions(-) create mode 100644 WOKA/Assets/Assets.xcassets/WebSeries/PlayButton.imageset/Contents.json create mode 100644 WOKA/Assets/Assets.xcassets/WebSeries/PlayButton.imageset/PlayButton.png create mode 100644 WOKA/Assets/Assets.xcassets/WebSeries/PlayButton.imageset/PlayButton@2x.png create mode 100644 WOKA/Assets/Assets.xcassets/WebSeries/PlayButton.imageset/PlayButton@3x.png create mode 100644 WOKA/Assets/Assets.xcassets/WebSeries/ShareImage.imageset/Contents.json create mode 100644 WOKA/Assets/Assets.xcassets/WebSeries/ShareImage.imageset/ShareImage.png create mode 100644 WOKA/Assets/Assets.xcassets/WebSeries/ShareImage.imageset/ShareImage@2x.png create mode 100644 WOKA/Assets/Assets.xcassets/WebSeries/ShareImage.imageset/ShareImage@3x.png create mode 100644 WOKA/Assets/Assets.xcassets/WebSeries/WebSeriesSeasonsBackground.imageset/Contents.json create mode 100644 WOKA/Assets/Assets.xcassets/WebSeries/WebSeriesSeasonsBackground.imageset/Modal1.png create mode 100644 WOKA/Helpers/Animation/ShimmerEffectView.swift create mode 100644 WOKA/WebSeries/Controller/WebSeriesSeasonVC.swift create mode 100644 WOKA/WebSeries/Model/SeasonListingDM.swift create mode 100644 WOKA/WebSeries/View/SeasonCategoryCell.swift create mode 100644 WOKA/WebSeries/View/SeasonCategoryCell.xib create mode 100644 WOKA/WebSeries/ViewModel/WebSeriesSeasonVM.swift 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 0000000000000000000000000000000000000000..effc134950463d1f3ccfa4bc56e76e608a0f2669 GIT binary patch literal 1394 zcmV-&1&#WNP)Px)EJ;K`R9HvFS8YsNRTzHHy?2|Wi8>s^AkBavB1lCv1TYlnwfK*WA1$T@GP_|Q zks)kN2_ze0OqQrLVFXBU{@|k-?GKFqq)?zlAVd+0^DBlwViQ0|F)_I8-h0e@*NX*8 zEwH(hv`uq9p69&pbKVaE2M+=O3;>9@M6cH;l$V#knVXxd&&kQj0su83Plm-Cc zx5dRp-`w2X*vQDpmu|P)A3T}`0120cgF=vS1A%c9R8&;FR8vz^uhZ$y6GF~LARIci zJ~}!&a^uF0n-dcgcY+f;XNE2eM*ta%8jVI}x7**>>2&V`z$x4$Ns@dMhGB4@@{x^z zA4!t%moN;2U^wo3Jf2RI$#i{fZS5}rkk5`pKweN?U7gn3+dC8!6Z0BkQc4AuWpVBx zi|sWG6-5z&INY|ny82C1Q5C~#@Vmk9|8Pb@4f%*4gTy$k>k4P0T5B+wHi$*jOLW^OrBwT5Gc#C5+NiSA{Z|)rfll<`b^T((_^Wvt-TdAO<2Dw76=3a zfy~Uz=ly>F??|$=v{Y@g+1hnF-39zF2m)FIjTKQJ3Kn7$pU>yW%F22Rqa4F9VQ&yh zAUQcXIS>eJp`tO;A#ipzeBx1Dm`Fu`7DMj;V1jA`q@r5CP z$tN_1$lT2iu~;nER4UcEs71K6v~*je(HM{U42!H* zYr9&l)*j{=E-x?NCf(iLZ`ak;eRh;Uq|@onwY0Qc<9Xh4lt9$m+j~(C#csFz4#O~~ zgO${OhT_!J)RS#(Z4G9#88g~ZLNQ|8<#|3+2Ai3g`7}R2|6&x$=nuQye%WTTSwoUh z*aUV^W>PRP0qXVocVrP642Bn-PUp7|GHk>Yd+c;92!h0M94#p+$(o#;{BfrsnVOpV zNUPOe{XYtl>FMbXtyX(QDM(~1Bqk=FT3K0{VOci&QI=#I8yibGIXMM>zyEKgB$Fd0 z7NwPym8k;*12dv1#yz5%zKevxV0fXUqhlyBG4a(0{RJGU zF(HI-__VjTx4*8ftu^=e_x~KJG1)~TK0aRMa5%6vy9@x>SRAD_yXWzEx*8iBulszy zs9H0H#7-kwQc{xH+}vDWT3T8T08urkl+tyN$Mbn#U*FB);o%zjq^8Ea~`!MbKKNI{n^$vmWVE_OC07*qoM6N<$f?t7v A_5c6? literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..20b5275ef8531b7b2faf52bb5acb227acbb68def GIT binary patch literal 3091 zcmV+u4D9oXP)Px=%}GQ-RCr$HTYXRz=NW(B-96wu;DneqHZ`Ul&BVqS2vd(JcgG2p3G(46cZO-T z@ef8t6H^c2M8FdiDHbdF(Da|$B%RUX7l=6$s~&eJ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Ow?rWWa|$N3{C>Cqj7XT^ zKdV=-esufx?L|hTaU;eU&I?nrqqD&E$={KFm(OMN(OKBU2y~H{j)T^J>~gt|y!z^^ zj?<@4e=NQ{W`Ywc2uc8u`-VUhWM*b&+?Fj{(&o>fZ;9mL>CZp^{8U3jLw9d)uRjuk z%O@WySiznf^Z0yxeEedo)w)op(*Yy2h^A@iMuB21bdbuA&-WpOzT`OW6Pl(!>hA9T h;NZc7H=})g{y#xVeCzDt!V3TZ002ovPDHLkV1l!w#=HOk literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..446dd9378574c247e74c145f9d22e6585f3b13b0 GIT binary patch literal 1768 zcmVP)Px*qDe$SRCr$Por`hZHV{R3JFqISU4fGhq6%VHV5@>i6~wL}Rt1(SuvCGS3L;k! zxq`R@gqO2;1M!grKmx>q517$tM*N7p2iRRKK4el_j4>~W=ocb-LqxBM=p_-oA|m|V z{!0ua&P zcY;9p-!@j`p@V!wM1M1LF&ISv7-Jyzp9MspVtm(`xm#w&?@h~Q0G!%>nZdlI5)Cck zBQxKox}onrn*cDzd?2E~#CiIjNyG8YKx73VrUt?znyIk>#3eJsac3!60EoHyBF;6- zgKvCOIO|V2oON;l#u!925FfGno=O(8lnj8>dPFvGvU@I{nfWT!3nl?zj6o0eYsI!c zR!_8s^Asj&H2`A_94y2Kgi|Vj@Q#_$yIx#Y0Wij(7yEgK_C8cl)av;(EytGvkg8PLKFaTxZh6L=KIVod;+4QV84?Y)N^CT;jxK|N+K07)eyx6?|z0_dpC z4)V+bXm&qd@xc`^L9gdbkq-bmTIlVzvRr{XW_~wy`6K{IDL>DOQY&GDvF-nr9gFL|^Dbm@jx`_nTRb;w5m6x99;nKQJgEMvkAlJY36!D{X@BtW@rCR;N!3^1m15LWP`GL5h0Cr%OdNX7J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{2fX&Ec$UdnSy~xx@eWd)`b=700i&@@#-iC6)k^72;-tgZl`tp^X^k8tA7_@;dm58;4kT#p73D0= zm^5tbUyN#{fps~@p;Tvn6BttCZ6Xp zwr+odRj-0kTS5&)yp_VL%3PK|23-SdWtn48Rpzp=`;+f_o1O_s)|UyWqH|fCi6mvPwX>kdAG#NhLUsHqLe!Cq2P5)V_hxJe51J;w#f1ZB>Fl= z(%y=j%PIjP|BOHZI$CTV`y8^5F4RidQu}?H^Sj`}WF;R{M$?*6vd@Z3joj mEK8HTsG0gC!})M*GX4XKrujmOrX7C(0000Px&4oO5oRA@u(np<)bK@^6+W=IwI6n7BafS45k8!*on7<41il}JLgeDksZWd#OT z06PdzLKPX>oZ*hZ+PUt6&)X@Iu3J$cu?nrJC_wooM+#Cvr?U#?HaK|glLu}=5AXf?~xw(Z4| z+cl`r{X9a4jm;yCV>KC}2;&azvII-&SUn2IQ4ZFuBeYE#fTeJ(p)+S2Xd}l`I@XyiKOgPqcvb=$oU?v=^yv!A#C73D4D*7xm;VgDgrX1^tj&I`PU==K` zw9vm&rZx|`8Pce?W3Dbk|J6bV0TW9u3ffe20x(GUGED&st7yap&lNCpNtM?UT@%4C zD@h!yhhI@3w@YC~1gjC;Wm^(C))GxIg3bW$JXA$LPC>4)B0JWV(XS2vrxH195!)VRj2w&$=td1X3qYr8&?W($C?oy7L`@X_{@0-6=5O-;rmiY-+ZFer zn{o6G)u31B+yni9#e}2JwFZ4C3(GXW1GR*i+8@z*>RgTq%v}8b1RlqPyVZE7&VJS> zFh>NAULqG2?)DC^Zmk9#bH+Ei&m$*ra_z8hb!i=xY`r&DYS3wbwx69jdi_G7wj90c e!t`oax%Usp)OC_5zsRNl00003#kH literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..b3d5dea8b2cc7ab93b90bdeb0b3b4621f84aee5e GIT binary patch literal 2813 zcmeAS@N?(olHy`uVBq!ia0y~yU|hq%z+}Y11{9g@^N$HgaTa()7Bet#3xhBt!>l*8o|0J?9FmO%sba4!+V0?Qg&`&yC!r@`|tgu(X zb3|KYx7>8xeYi~Xu4CB*m%9#S0>1)G`BmQe@ElB-VbFyOf z`>OX#F%&%LV`E_95M$tMVs&UrV4R>3!JsnA9oC`I!*q~I!EpnFhky=)5DRw$%P4m= zG)5BxmGVLY1M6r}I$DzqNJV;RvSHZ%b;m9i8HSxd9-$MSEaU&Z|M~C7m)}P4G3-e1 zUcdLj)!kP`*6i<}-}8Rj>kYm0!-CIn+#P6!F@8)Y}74Ok;X4a#@#7Yjom*r$H`pJv zQkbU9SSGw?!Q1XF;{Lw52b|R-`0xC@Vs`)kp`F_-a~`qDm>hhxSzpJqj%${x=L0)V zvHNd!^{SlP&RFidVMp-m9ed+v-D&vmwZTGT_UTEY0e)hkQWgdUeS`o3X zEx*k0?%L&hPahAPp0s_3#dGzh?9XlO{?8|cy_VQJ_x*XnS$#f 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + +