- Fixed the blog image issue for fit.

- Finalised more module.
- Made UI for notifications
- Made notification cells
- Added pull to refresh
- Worked on logic for Favourites.
- Getting the logic data, then separating the hindi web series
- Added collection for Webseries hindi , English , Audio book, karaoke, games
- MAde the data model for favourites
This commit is contained in:
2024-06-13 19:54:44 +05:30
parent 4887db2d4a
commit 3754a7f75b
26 changed files with 1333 additions and 48 deletions

View File

@@ -16,6 +16,11 @@
522A93132C0DB5D50098FE49 /* JWPlayerKit in Frameworks */ = {isa = PBXBuildFile; productRef = 522A93122C0DB5D50098FE49 /* JWPlayerKit */; };
522A931A2C0DE8CC0098FE49 /* SideBarNav.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 522A93192C0DE8CC0098FE49 /* SideBarNav.storyboard */; };
522A931C2C0DE9150098FE49 /* AboutUsVc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 522A931B2C0DE9150098FE49 /* AboutUsVc.swift */; };
522D655E2C1ACCF40021E505 /* UserNotificationDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 522D655D2C1ACCF40021E505 /* UserNotificationDM.swift */; };
522D65602C1ACD8D0021E505 /* UserNotificationVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 522D655F2C1ACD8C0021E505 /* UserNotificationVC.swift */; };
522D65622C1ACDA40021E505 /* CommonNwCall.swift in Sources */ = {isa = PBXBuildFile; fileRef = 522D65612C1ACDA40021E505 /* CommonNwCall.swift */; };
522D65652C1ACE9C0021E505 /* UserNotificationCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 522D65642C1ACE9C0021E505 /* UserNotificationCell.xib */; };
522D65662C1ACE9C0021E505 /* UserNotificationCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 522D65632C1ACE9C0021E505 /* UserNotificationCell.swift */; };
523ED25E2BDA2BC700CFED02 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 523ED25D2BDA2BC700CFED02 /* AppDelegate.swift */; };
523ED2602BDA2BC700CFED02 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 523ED25F2BDA2BC700CFED02 /* SceneDelegate.swift */; };
523ED2622BDA2BC700CFED02 /* SplashVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 523ED2612BDA2BC700CFED02 /* SplashVC.swift */; };
@@ -82,6 +87,10 @@
52A3F6AB2BECBF550000BB0B /* LinkedChildVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A3F6AA2BECBF550000BB0B /* LinkedChildVC.swift */; };
52A3F6AD2BECC0340000BB0B /* TypeAlias.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A3F6AC2BECC0340000BB0B /* TypeAlias.swift */; };
52A3F6AF2BECC0690000BB0B /* LinkedChildVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A3F6AE2BECC0690000BB0B /* LinkedChildVM.swift */; };
52A981CE2C1AFE66000E0BEC /* FavouriteListingDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A981CD2C1AFE66000E0BEC /* FavouriteListingDM.swift */; };
52A981D02C1AFEE8000E0BEC /* MyListVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A981CF2C1AFEE8000E0BEC /* MyListVM.swift */; };
52A981D72C1B0E27000E0BEC /* FavouriteCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A981D52C1B0E27000E0BEC /* FavouriteCell.swift */; };
52A981D82C1B0E27000E0BEC /* FavouriteCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 52A981D62C1B0E27000E0BEC /* FavouriteCell.xib */; };
52AECA802C08BCB6004A7579 /* PlayerVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52AECA7F2C08BCB6004A7579 /* PlayerVC.swift */; };
52B8D4D92C04A25E00ED65F3 /* UIViewController+Container.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52B8D4CE2C04A25D00ED65F3 /* UIViewController+Container.swift */; };
52B8D4DA2C04A25E00ED65F3 /* Preferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52B8D4CF2C04A25D00ED65F3 /* Preferences.swift */; };
@@ -126,6 +135,7 @@
52CA28FA2BE119F500708B49 /* UserIntrestVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52CA28F92BE119F500708B49 /* UserIntrestVC.swift */; };
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 */; };
52D774E92BDFBDA4001D87DE /* AuthenticationStringConstant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D774E82BDFBDA4001D87DE /* AuthenticationStringConstant.swift */; };
52D774EB2BDFC0BF001D87DE /* OTPVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D774EA2BDFC0BF001D87DE /* OTPVC.swift */; };
52D774ED2BDFC13F001D87DE /* OTPVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D774EC2BDFC13F001D87DE /* OTPVM.swift */; };
@@ -220,6 +230,11 @@
522242692BFC7AFC0085C632 /* SideMenuVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SideMenuVC.swift; sourceTree = "<group>"; };
522A93192C0DE8CC0098FE49 /* SideBarNav.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = SideBarNav.storyboard; sourceTree = "<group>"; };
522A931B2C0DE9150098FE49 /* AboutUsVc.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutUsVc.swift; sourceTree = "<group>"; };
522D655D2C1ACCF40021E505 /* UserNotificationDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserNotificationDM.swift; sourceTree = "<group>"; };
522D655F2C1ACD8C0021E505 /* UserNotificationVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserNotificationVC.swift; sourceTree = "<group>"; };
522D65612C1ACDA40021E505 /* CommonNwCall.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommonNwCall.swift; sourceTree = "<group>"; };
522D65632C1ACE9C0021E505 /* UserNotificationCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserNotificationCell.swift; sourceTree = "<group>"; };
522D65642C1ACE9C0021E505 /* UserNotificationCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = UserNotificationCell.xib; sourceTree = "<group>"; };
523ED25A2BDA2BC700CFED02 /* WOKA.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WOKA.app; sourceTree = BUILT_PRODUCTS_DIR; };
523ED25D2BDA2BC700CFED02 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
523ED25F2BDA2BC700CFED02 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
@@ -284,6 +299,10 @@
52A3F6AA2BECBF550000BB0B /* LinkedChildVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkedChildVC.swift; sourceTree = "<group>"; };
52A3F6AC2BECC0340000BB0B /* TypeAlias.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeAlias.swift; sourceTree = "<group>"; };
52A3F6AE2BECC0690000BB0B /* LinkedChildVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkedChildVM.swift; sourceTree = "<group>"; };
52A981CD2C1AFE66000E0BEC /* FavouriteListingDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FavouriteListingDM.swift; sourceTree = "<group>"; };
52A981CF2C1AFEE8000E0BEC /* MyListVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyListVM.swift; sourceTree = "<group>"; };
52A981D52C1B0E27000E0BEC /* FavouriteCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FavouriteCell.swift; sourceTree = "<group>"; };
52A981D62C1B0E27000E0BEC /* FavouriteCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = FavouriteCell.xib; sourceTree = "<group>"; };
52AECA7F2C08BCB6004A7579 /* PlayerVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerVC.swift; sourceTree = "<group>"; };
52B8D4CE2C04A25D00ED65F3 /* UIViewController+Container.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIViewController+Container.swift"; sourceTree = "<group>"; };
52B8D4CF2C04A25D00ED65F3 /* Preferences.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Preferences.swift; sourceTree = "<group>"; };
@@ -330,6 +349,7 @@
52CA28F92BE119F500708B49 /* UserIntrestVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserIntrestVC.swift; sourceTree = "<group>"; };
52CA28FB2BE11A0400708B49 /* UserIntrestVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserIntrestVM.swift; sourceTree = "<group>"; };
52CC38C22BDF812F00B74C3E /* LocalisedElements.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalisedElements.swift; sourceTree = "<group>"; };
52CCD7AF2C1AF0F80078BD65 /* RadioVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RadioVC.swift; sourceTree = "<group>"; };
52D774E82BDFBDA4001D87DE /* AuthenticationStringConstant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticationStringConstant.swift; sourceTree = "<group>"; };
52D774EA2BDFC0BF001D87DE /* OTPVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OTPVC.swift; sourceTree = "<group>"; };
52D774EC2BDFC13F001D87DE /* OTPVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OTPVM.swift; sourceTree = "<group>"; };
@@ -696,6 +716,7 @@
525327D12BFCC1BC00F64283 /* Model */ = {
isa = PBXGroup;
children = (
52A981CD2C1AFE66000E0BEC /* FavouriteListingDM.swift */,
);
path = Model;
sourceTree = "<group>";
@@ -703,6 +724,7 @@
525327D32BFCC1C900F64283 /* ViewModel */ = {
isa = PBXGroup;
children = (
52A981CF2C1AFEE8000E0BEC /* MyListVM.swift */,
);
path = ViewModel;
sourceTree = "<group>";
@@ -882,6 +904,7 @@
52FDBA772BFF23F4009D7AC7 /* TimePeriod.swift */,
52BC3BEF2C1701F8002FACA6 /* BlogDM.swift */,
527AC6F92C17387300434FB7 /* SongBlogDM.swift */,
522D655D2C1ACCF40021E505 /* UserNotificationDM.swift */,
);
path = Model;
sourceTree = "<group>";
@@ -895,6 +918,8 @@
527AC6F62C171C8F00434FB7 /* BlogsCell.xib */,
527AC6FB2C173A5100434FB7 /* SongListCell.swift */,
527AC6FC2C173A5100434FB7 /* SongListCell.xib */,
522D65632C1ACE9C0021E505 /* UserNotificationCell.swift */,
522D65642C1ACE9C0021E505 /* UserNotificationCell.xib */,
);
path = View;
sourceTree = "<group>";
@@ -937,6 +962,8 @@
9C535DC72C00BF3E00DA6DCD /* View */ = {
isa = PBXGroup;
children = (
52A981D52C1B0E27000E0BEC /* FavouriteCell.swift */,
52A981D62C1B0E27000E0BEC /* FavouriteCell.xib */,
);
path = View;
sourceTree = "<group>";
@@ -948,6 +975,7 @@
52F12C812C04569500AF8139 /* View */,
9C535DCC2C00CD1200DA6DCD /* ViewModel */,
9C535DCB2C00CD0800DA6DCD /* Controller */,
522D65612C1ACDA40021E505 /* CommonNwCall.swift */,
52C1A4E72C05C95D007BAA50 /* Theme.storyboard */,
);
path = Theme;
@@ -960,6 +988,8 @@
9C535DC12C00B36900DA6DCD /* ThemeTwoVC.swift */,
52AECA7F2C08BCB6004A7579 /* PlayerVC.swift */,
52BC3BED2C16FBDB002FACA6 /* MoreVC.swift */,
522D655F2C1ACD8C0021E505 /* UserNotificationVC.swift */,
52CCD7AF2C1AF0F80078BD65 /* RadioVC.swift */,
);
path = Controller;
sourceTree = "<group>";
@@ -1247,8 +1277,10 @@
52C8B05B2BDA5924003B51D0 /* WokaSplashSound.m4a in Resources */,
525954352BEB4B3B00191286 /* Exo2-Thin.ttf in Resources */,
527AC6F82C171C8F00434FB7 /* BlogsCell.xib in Resources */,
52A981D82C1B0E27000E0BEC /* FavouriteCell.xib in Resources */,
52C1A4E82C05C95D007BAA50 /* Theme.storyboard in Resources */,
525954362BEB4B3B00191286 /* Exo2-Medium.ttf in Resources */,
522D65652C1ACE9C0021E505 /* UserNotificationCell.xib in Resources */,
525954372BEB4B3B00191286 /* Exo2-Bold.ttf in Resources */,
525954382BEB4B3B00191286 /* Exo2-Regular.ttf in Resources */,
525954392BEB4B3B00191286 /* Exo2-ExtraBold.ttf in Resources */,
@@ -1360,6 +1392,7 @@
522242662BFC74380085C632 /* MyListVC.swift in Sources */,
5259542B2BEA292800191286 /* UserRegPostModel.swift in Sources */,
52C8B0572BDA57DB003B51D0 /* Constant.swift in Sources */,
52CCD7B02C1AF0F80078BD65 /* RadioVC.swift in Sources */,
52AECA802C08BCB6004A7579 /* PlayerVC.swift in Sources */,
5202AB012BDFA7900043B7BD /* EmailValidation.swift in Sources */,
52B8D4E12C04A25E00ED65F3 /* BasicTransitionAnimator.swift in Sources */,
@@ -1406,6 +1439,7 @@
9CBCB2AA2BE51A52007D7934 /* ThemeOneVC.swift in Sources */,
52D774E92BDFBDA4001D87DE /* AuthenticationStringConstant.swift in Sources */,
5259541B2BE8D6F900191286 /* NetworkReachibility.swift in Sources */,
52A981CE2C1AFE66000E0BEC /* FavouriteListingDM.swift in Sources */,
527AC6FD2C173A5100434FB7 /* SongListCell.swift in Sources */,
9C27E1672BDB706700EC1DA9 /* StoryBoard.swift in Sources */,
52C8B0692BDA6E1E003B51D0 /* LocalizedEnum.swift in Sources */,
@@ -1413,6 +1447,7 @@
525954172BE8CAD300191286 /* NetworkManager.swift in Sources */,
52B8D4DD2C04A25E00ED65F3 /* UIViewController+SideMenu.swift in Sources */,
525954292BEA079500191286 /* UserEmailVerifyDM.swift in Sources */,
522D655E2C1ACCF40021E505 /* UserNotificationDM.swift in Sources */,
9C1C69FC2C106C240035B2C7 /* ContactSupportVM.swift in Sources */,
52A3F6AF2BECC0690000BB0B /* LinkedChildVM.swift in Sources */,
525954252BE8F01600191286 /* ValueWrapper.swift in Sources */,
@@ -1429,6 +1464,7 @@
52BC3BEC2C16DF9F002FACA6 /* MyOrdersVC.swift in Sources */,
9C56E8482BDBEFAB00E4CA14 /* AssetColor.swift in Sources */,
9C0A85432BEE3EC90093783D /* NewPasswordVM.swift in Sources */,
522D65662C1ACE9C0021E505 /* UserNotificationCell.swift in Sources */,
524C42332C049D590016A11C /* CustomizableSegmentControl.swift in Sources */,
9C535DB52C005A6D00DA6DCD /* KeyWindowFix.swift in Sources */,
9C9BEEC72BEE1BBF004ECC2F /* CollectionViewCenteredFlowLayout.swift in Sources */,
@@ -1438,6 +1474,7 @@
524C42312C0499560016A11C /* NotificationCenterReloads.swift in Sources */,
9C8C4FAE2C1315410017DD3B /* WebViewVC.swift in Sources */,
52BC3BE22C0E02EE002FACA6 /* FaqVC.swift in Sources */,
52A981D02C1AFEE8000E0BEC /* MyListVM.swift in Sources */,
5272FCE52BDFDC8C000ECB1D /* UserDetailsRegisterVM.swift in Sources */,
525954272BE9178F00191286 /* UserDataDM.swift in Sources */,
9C27E1652BDB6FBC00EC1DA9 /* StoryBoardID.swift in Sources */,
@@ -1449,9 +1486,11 @@
522242682BFC74380085C632 /* TabBarVC.swift in Sources */,
9C27E1722BDB86B600EC1DA9 /* OnBoardCell.swift in Sources */,
529B0DD42C06156B00CFC54B /* LoginNavVC.swift in Sources */,
52A981D72C1B0E27000E0BEC /* FavouriteCell.swift in Sources */,
52C8B05F2BDA5AFA003B51D0 /* SplashVM.swift in Sources */,
52C1A4E12C05B69F007BAA50 /* UIApplicationSwitchRoot.swift in Sources */,
52663FF72BDFACF60001D8CE /* ShadowView.swift in Sources */,
522D65602C1ACD8D0021E505 /* UserNotificationVC.swift in Sources */,
9C535DC22C00B36900DA6DCD /* ThemeTwoVC.swift in Sources */,
9CA7C6C22C1095B600D73742 /* ProfileVM.swift in Sources */,
52D774F12BDFC53B001D87DE /* StringSubScript.swift in Sources */,
@@ -1468,6 +1507,7 @@
9C27E16D2BDB852F00EC1DA9 /* GVar.swift in Sources */,
52B8D4E02C04A25E00ED65F3 /* UIView+Container.swift in Sources */,
9C56E8462BDBEE6400E4CA14 /* EmailVC.swift in Sources */,
522D65622C1ACDA40021E505 /* CommonNwCall.swift in Sources */,
525327D92BFCDDF700F64283 /* AuthFuncStartupSoundHandling.swift in Sources */,
52663FFB2BDFB1700001D8CE /* TextFieldShadow.swift in Sources */,
52C6E0212BE3ADE300E22D59 /* GenderEnum.swift in Sources */,

View File

@@ -0,0 +1,24 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "back.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

View File

@@ -34,6 +34,8 @@ extension K{
struct Home{
static let blogsCell = "BlogsCell"
static let songListCell = "SongListCell"
static let userNotificationCell = "UserNotificationCell"
static let favouriteCell = "FavouriteCell"
}
}
}

View File

@@ -31,6 +31,7 @@ extension K{
struct Home{
static let homeVC = "HomeVC"
static let userNotificationVC = "UserNotificationVC"
}
struct CustomAlerts{
@@ -42,6 +43,7 @@ extension K{
static let themeOneVC = "ThemeOneVC"
static let themeTwoVC = "ThemeTwoVC"
static let moreVC = "MoreVC"
static let radioVC = "RadioVC"
}
struct SideBarNav{

View File

@@ -227,9 +227,10 @@ enum DateFormats: String, CaseIterable {
case d = "d" // 2
case EEEE = "EEEE" // wednesday
case EEE = "EEE" // wed
case yyyy_MM_dd_T_HH_mm_ss_SSSZ = "yyyy_MM_dd_T_HH_mm_ss_SSSZ"
case yyyy_MM_dd_THH_mm_ss_SSSZ = "yyyy_MM_dd_THH:mm:ss.SSSZ" // 2024-05-21T17:50:15.000000Z
case yyyy_MM_ddTHH_mm_ss_ssZ = "yyyy-MM-dd'T'HH:mm:ss:ssZ" //
case yyyy_MM_dd_HH_mm_ss = "yyyy-MM-dd HH:mm:ss" // 2023-07-25 14:03:07

View File

@@ -8,12 +8,137 @@ import UIKit
class MyListVC: UIViewController {
@IBOutlet weak var webSeriesCV: UICollectionView!
@IBOutlet weak var webSeriesEnglishStack: UIStackView!
@IBOutlet weak var webSeriesHindiCV: UICollectionView!
@IBOutlet weak var webSeriesHindiStack: UIStackView!
@IBOutlet weak var audioBooksCV: UICollectionView!
@IBOutlet weak var audioBooksStack: UIStackView!
@IBOutlet weak var karaokeCV: UICollectionView!
@IBOutlet weak var karaokeStack: UIStackView!
@IBOutlet weak var gamesCV: UICollectionView!
@IBOutlet weak var gamesStack: UIStackView!
var vm = MyListVM()
override func viewDidLoad() {
super.viewDidLoad()
vm.vc = self
vm.initView()
}
@IBAction func sideBarBtnTapped(_ sender: UIButton) {
self.sideMenuController?.revealMenu()
}
@IBAction func backBtntapped(_ sender: UIButton) {
self.tabBarController?.selectedIndex = 0
}
}
// MARK: - CollectionView Delegate
extension MyListVC : CollectionViewSRC{
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
switch collectionView{
case webSeriesCV:
if vm.favListingData?.showData?.count == 0{
webSeriesEnglishStack.isHidden = true
}else{
webSeriesEnglishStack.isHidden = false
}
return vm.favListingData?.showData?.count ?? 0
case audioBooksCV:
if vm.favListingData?.audioData?.count == 0{
audioBooksStack.isHidden = true
}else{
audioBooksStack.isHidden = false
}
return vm.favListingData?.audioData?.count ?? 0
case karaokeCV:
if vm.favListingData?.singKaraokeData?.count == 0{
karaokeStack.isHidden = true
}else{
karaokeStack.isHidden = false
}
return vm.favListingData?.singKaraokeData?.count ?? 0
case gamesCV:
if vm.favListingData?.gameData?.count == 0{
gamesStack.isHidden = true
}else{
gamesStack.isHidden = false
}
return vm.favListingData?.gameData?.count ?? 0
case webSeriesHindiCV:
if vm.webSeriesHindi.count == 0{
webSeriesHindiStack.isHidden = true
}else{
webSeriesHindiStack.isHidden = false
}
return vm.webSeriesHindi.count
default:
return 0
}
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: K.CellIdentifier.Home.favouriteCell, for: indexPath) as! FavouriteCell
switch collectionView{
case webSeriesCV:
if let data = vm.favListingData?.showData?[indexPath.row]{
cell.setData(data: data)
}
case webSeriesHindiCV:
let data = vm.webSeriesHindi[indexPath.row]
cell.setData(data: data)
case audioBooksCV:
if let data = vm.favListingData?.audioData?[indexPath.row]{
cell.setOtherData(data: data)
}
case karaokeCV:
if let data = vm.favListingData?.singKaraokeData?[indexPath.row]{
cell.setOtherData(data: data)
}
case gamesCV:
if let data = vm.favListingData?.gameData?[indexPath.row]{
cell.setOtherData(data: data)
}
default:
if let data = vm.favListingData?.showData?[indexPath.row]{
cell.setData(data: data)
}
}
return cell
}
}
// MARK: - Collection Flow Layout
extension MyListVC : UICollectionViewDelegateFlowLayout{
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
return 5
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
let inset: CGFloat = 10
return UIEdgeInsets(top: 0, left: inset, bottom: 0, right: inset)
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
return 0 // Space between cells
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
let widthPerItem = collectionView.frame.width - 30 // Adjust to your desired width
return CGSize(width: widthPerItem, height: 230)
}
}

View File

@@ -4,6 +4,7 @@
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -862,6 +863,9 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="OrderBottom" translatesAutoresizingMaskIntoConstraints="NO" id="fTK-nk-bN9">
<rect key="frame" x="0.0" y="538.5" width="414" height="294.5"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="a7Y-B6-f0Q">
<rect key="frame" x="359" y="58" width="40" height="40"/>
<constraints>
@@ -876,20 +880,215 @@
<action selector="sideBarBtnTapped:" destination="55l-Gk-Npk" eventType="touchUpInside" id="L0r-44-zYU"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Favourites" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jbL-QO-JJl" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="70" y="64" width="111.5" height="26.5"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="22"/>
<color key="textColor" name="TextDarkBlue"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5ML-g4-686">
<rect key="frame" x="5" y="53" width="50" height="50"/>
<constraints>
<constraint firstAttribute="width" constant="50" id="7gr-YK-bnO"/>
<constraint firstAttribute="height" constant="50" id="a9f-OZ-IUx"/>
</constraints>
<color key="tintColor" name="TextDarkBlue"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="BackArrow"/>
<connections>
<action selector="backBtntapped:" destination="55l-Gk-Npk" eventType="touchUpInside" id="qKE-a6-87A"/>
</connections>
</button>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SyC-Qw-kzE">
<rect key="frame" x="0.0" y="108" width="414" height="705"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="45l-57-MA3">
<rect key="frame" x="0.0" y="0.0" width="414" height="1330"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="vZT-j7-NyY">
<rect key="frame" x="0.0" y="0.0" width="414" height="252"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" WebSeries (English)" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xht-7u-pAV" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="414" height="22"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
<color key="textColor" name="TextDarkBlue"/>
<nil key="highlightedColor"/>
</label>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="6Y6-vJ-OYT">
<rect key="frame" x="0.0" y="22" width="414" height="230"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="230" id="wyY-bJ-KIZ"/>
</constraints>
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="10" minimumInteritemSpacing="10" id="fxC-do-NZl">
<size key="itemSize" width="128" height="128"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
<cells/>
</collectionView>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="h1g-o9-Qbb">
<rect key="frame" x="0.0" y="262" width="414" height="252"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" WebSeries (Hindi)" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UTS-hr-ix6" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="414" height="22"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
<color key="textColor" name="TextDarkBlue"/>
<nil key="highlightedColor"/>
</label>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="aW7-x8-HRh">
<rect key="frame" x="0.0" y="22" width="414" height="230"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="230" id="rMj-vz-b8j"/>
</constraints>
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="10" minimumInteritemSpacing="10" id="zYF-w0-QcX">
<size key="itemSize" width="128" height="128"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
<cells/>
</collectionView>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="G4a-BA-Nw8">
<rect key="frame" x="0.0" y="524" width="414" height="252"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Audio Books" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uOV-bc-Z6x" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="414" height="22"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
<color key="textColor" name="TextDarkBlue"/>
<nil key="highlightedColor"/>
</label>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="ABR-no-OBf">
<rect key="frame" x="0.0" y="22" width="414" height="230"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="230" id="hbc-ha-qTS"/>
</constraints>
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="10" minimumInteritemSpacing="10" id="fFv-qj-izU">
<size key="itemSize" width="128" height="128"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
<cells/>
</collectionView>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="jE2-WP-tD4">
<rect key="frame" x="0.0" y="786" width="414" height="252"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Karaoke" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JBX-qP-uJM" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="414" height="22"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
<color key="textColor" name="TextDarkBlue"/>
<nil key="highlightedColor"/>
</label>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="Grz-ok-w2U">
<rect key="frame" x="0.0" y="22" width="414" height="230"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="230" id="cJI-sp-1u2"/>
</constraints>
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="10" minimumInteritemSpacing="10" id="IHu-Jh-YN9">
<size key="itemSize" width="128" height="128"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
<cells/>
</collectionView>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="Cgp-Ok-Imj">
<rect key="frame" x="0.0" y="1048" width="414" height="252"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Games" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qph-Fh-w3E" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="414" height="22"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
<color key="textColor" name="TextDarkBlue"/>
<nil key="highlightedColor"/>
</label>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="5ff-Y7-nit">
<rect key="frame" x="0.0" y="22" width="414" height="230"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="230" id="vnV-51-p2Q"/>
</constraints>
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="10" minimumInteritemSpacing="10" id="bOQ-ng-G9a">
<size key="itemSize" width="128" height="128"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
<cells/>
</collectionView>
</subviews>
</stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="F2F-sK-9oY">
<rect key="frame" x="0.0" y="1310" width="414" height="20"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="Jsj-FP-k6f"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="45l-57-MA3" secondAttribute="bottom" id="Nkr-Hz-XSO"/>
<constraint firstItem="ijh-ix-uLc" firstAttribute="trailing" secondItem="45l-57-MA3" secondAttribute="trailing" id="Wxo-E8-K4H"/>
<constraint firstItem="45l-57-MA3" firstAttribute="width" secondItem="ac6-o2-deF" secondAttribute="width" id="f31-pJ-z1V"/>
<constraint firstItem="45l-57-MA3" firstAttribute="top" secondItem="SyC-Qw-kzE" secondAttribute="top" id="gqz-lr-K2w"/>
<constraint firstItem="45l-57-MA3" firstAttribute="leading" secondItem="ijh-ix-uLc" secondAttribute="leading" id="tlR-4G-Hsf"/>
</constraints>
<viewLayoutGuide key="contentLayoutGuide" id="ac6-o2-deF"/>
<viewLayoutGuide key="frameLayoutGuide" id="ijh-ix-uLc"/>
</scrollView>
</subviews>
<viewLayoutGuide key="safeArea" id="fPD-rO-ZgU"/>
<color key="backgroundColor" systemColor="systemCyanColor"/>
<color key="backgroundColor" red="0.82745098039215681" green="0.93725490196078431" blue="0.97254901960784312" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="fPD-rO-ZgU" firstAttribute="trailing" secondItem="a7Y-B6-f0Q" secondAttribute="trailing" constant="15" id="1TC-Nf-fdz"/>
<constraint firstItem="jbL-QO-JJl" firstAttribute="leading" secondItem="5ML-g4-686" secondAttribute="trailing" constant="15" id="5bI-AA-E64"/>
<constraint firstItem="SyC-Qw-kzE" firstAttribute="bottom" secondItem="fPD-rO-ZgU" secondAttribute="bottom" id="7R3-kt-ANX"/>
<constraint firstItem="fTK-nk-bN9" firstAttribute="leading" secondItem="fPD-rO-ZgU" secondAttribute="leading" id="KDZ-vt-s13"/>
<constraint firstItem="a7Y-B6-f0Q" firstAttribute="top" secondItem="fPD-rO-ZgU" secondAttribute="top" constant="10" id="L4o-KM-D1O"/>
<constraint firstItem="SyC-Qw-kzE" firstAttribute="trailing" secondItem="fPD-rO-ZgU" secondAttribute="trailing" id="M3t-nE-gwc"/>
<constraint firstItem="5ML-g4-686" firstAttribute="leading" secondItem="23B-pX-ODs" secondAttribute="leading" constant="5" id="Na5-Wr-DSa"/>
<constraint firstItem="SyC-Qw-kzE" firstAttribute="top" secondItem="a7Y-B6-f0Q" secondAttribute="bottom" constant="10" id="Nyh-j8-zuL"/>
<constraint firstItem="fPD-rO-ZgU" firstAttribute="trailing" secondItem="fTK-nk-bN9" secondAttribute="trailing" id="XRW-xO-sGx"/>
<constraint firstItem="5ML-g4-686" firstAttribute="centerY" secondItem="a7Y-B6-f0Q" secondAttribute="centerY" id="aC4-mQ-heC"/>
<constraint firstItem="SyC-Qw-kzE" firstAttribute="leading" secondItem="fPD-rO-ZgU" secondAttribute="leading" id="cd5-Pg-diL"/>
<constraint firstItem="jbL-QO-JJl" firstAttribute="centerY" secondItem="5ML-g4-686" secondAttribute="centerY" constant="-1" id="h8B-5o-mja"/>
<constraint firstItem="fPD-rO-ZgU" firstAttribute="bottom" secondItem="fTK-nk-bN9" secondAttribute="bottom" constant="-20" id="vmC-a4-Yy3"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="MY LIST" image="HeartIcon" id="dhn-IV-GcD"/>
<navigationItem key="navigationItem" id="dCO-Wi-XFC"/>
<connections>
<outlet property="audioBooksCV" destination="ABR-no-OBf" id="axa-Ry-rEx"/>
<outlet property="audioBooksStack" destination="G4a-BA-Nw8" id="kNl-ev-XoJ"/>
<outlet property="gamesCV" destination="5ff-Y7-nit" id="vM3-Z9-paV"/>
<outlet property="gamesStack" destination="Cgp-Ok-Imj" id="63D-lB-0lW"/>
<outlet property="karaokeCV" destination="Grz-ok-w2U" id="vAr-XE-2Ne"/>
<outlet property="karaokeStack" destination="jE2-WP-tD4" id="azr-yq-sDA"/>
<outlet property="webSeriesCV" destination="6Y6-vJ-OYT" id="FRf-D2-kxM"/>
<outlet property="webSeriesEnglishStack" destination="vZT-j7-NyY" id="HG5-LW-alT"/>
<outlet property="webSeriesHindiCV" destination="aW7-x8-HRh" id="eJM-QC-gIw"/>
<outlet property="webSeriesHindiStack" destination="h1g-o9-Qbb" id="cbP-E3-4Bc"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="lPK-ME-Nlb" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2199" y="978"/>
<point key="canvasLocation" x="2198.5507246376815" y="977.67857142857133"/>
</scene>
<!--EXPLORE WOKA-->
<scene sceneID="taU-OT-R2P">
@@ -941,6 +1140,7 @@
</scenes>
<resources>
<image name="AudioBookIcon" width="33.5" height="30"/>
<image name="BackArrow" width="21.333333969116211" height="21.333333969116211"/>
<image name="BlogsIcon" width="33" height="33"/>
<image name="CheckMark" width="48" height="48"/>
<image name="CloseIcon" width="61.333332061767578" height="61.333332061767578"/>
@@ -950,6 +1150,7 @@
<image name="HomeIcon" width="26.5" height="26.5"/>
<image name="KaraokeIcon" width="33.5" height="30"/>
<image name="LiveTvIcon" width="37" height="35"/>
<image name="OrderBottom" width="570.66668701171875" height="294.66665649414062"/>
<image name="ShopIcon" width="38" height="39"/>
<image name="SideMenu" width="44" height="44"/>
<image name="Theme1" width="106" height="160"/>
@@ -957,14 +1158,14 @@
<image name="WebSeriesIcon" width="33" height="30"/>
<image name="WokaFmIcon" width="35" height="35"/>
<image name="xmark" catalog="system" width="128" height="113"/>
<namedColor name="TextDarkBlue">
<color red="0.10599999874830246" green="0.050999999046325684" blue="0.60399997234344482" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemCyanColor">
<color red="0.1960784314" green="0.67843137249999996" blue="0.90196078430000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemGreenColor">
<color red="0.20392156859999999" green="0.78039215689999997" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.20392156862745098" green="0.7803921568627451" blue="0.34901960784313724" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>

View File

@@ -0,0 +1,123 @@
//
// FavouriteListingDM.swift
// WOKA
//
// Created by MacBook Pro on 13/06/24.
//
import Foundation
// MARK: - FavouriteListingDM
struct FavouriteListingDM: Codable {
let result: ResultData?
// MARK: - Result
struct ResultData: Codable {
var showData: [ShowDatum]?
let videoData: [Datum]?
let gameData, audioData, singKaraokeData: [Datum]?
enum CodingKeys: String, CodingKey {
case showData = "show_data"
case videoData = "video_data"
case gameData = "game_data"
case audioData = "audio_data"
case singKaraokeData = "sing_karaoke_data"
}
// MARK: - Datum
struct Datum: Codable {
let id: Int?
let title, description: String?
let thumbnailPath: String?
let audioURL: String?
let categoryMasterID, ageRangeMasterID, tagsKeyword, releaseDate: String?
let languageMasterID: Int?
let genderMasterID, audioDuration, mediaID: String?
let contentMoreDetails: [ContentMoreDetail]?
let markAsFavourite, isLiked: Bool?
let viewsCount, likesCount, bookmarkCount: Int?
let bookmarkCategoryIDS: String?
let gameURL: String?
let screenOrientation: String?
let videoURL: String?
let duration: String?
enum CodingKeys: String, CodingKey {
case id, title, description
case thumbnailPath = "thumbnail_path"
case audioURL = "audio_url"
case categoryMasterID = "category_master_id"
case ageRangeMasterID = "age_range_master_id"
case tagsKeyword = "tags_keyword"
case releaseDate = "release_date"
case languageMasterID = "language_master_id"
case genderMasterID = "gender_master_id"
case audioDuration = "audio_duration"
case mediaID = "media_id"
case contentMoreDetails = "content_more_details"
case markAsFavourite = "mark_as_favourite"
case isLiked = "is_liked"
case viewsCount = "views_count"
case likesCount = "likes_count"
case bookmarkCount = "bookmark_count"
case bookmarkCategoryIDS = "bookmark_category_ids"
case gameURL = "game_url"
case screenOrientation = "screen_orientation"
case videoURL = "video_url"
case duration
}
}
// MARK: - ContentMoreDetail
struct ContentMoreDetail: Codable {
let id, contentID, postType, languageMasterID: Int?
let title, description: String?
let url: String?
let tagsKeywords: String?
enum CodingKeys: String, CodingKey {
case id
case contentID = "content_id"
case postType = "post_type"
case languageMasterID = "language_master_id"
case title, description, url
case tagsKeywords = "tags_keywords"
}
}
// MARK: - ShowDatum
struct ShowDatum: Codable {
let id: Int?
let title, description: String?
let thumbnailPath: String?
let showType: String?
let totalSeasons, totalEpisodes: Int?
let categoryMasterID, ageRangeMasterID, genderMasterID: String?
let contentMoreDetails: [ContentMoreDetail]?
let markAsFavourite, isLiked: Bool?
let viewsCount, likesCount, bookmarkCount: Int?
let bookmarkCategoryIDS: String?
enum CodingKeys: String, CodingKey {
case id, title, description
case thumbnailPath = "thumbnail_path"
case showType = "show_type"
case totalSeasons = "total_seasons"
case totalEpisodes = "total_episodes"
case categoryMasterID = "category_master_id"
case ageRangeMasterID = "age_range_master_id"
case genderMasterID = "gender_master_id"
case contentMoreDetails = "content_more_details"
case markAsFavourite = "mark_as_favourite"
case isLiked = "is_liked"
case viewsCount = "views_count"
case likesCount = "likes_count"
case bookmarkCount = "bookmark_count"
case bookmarkCategoryIDS = "bookmark_category_ids"
}
}
}
}

View File

@@ -0,0 +1,78 @@
//
// FavouriteCell.swift
// WOKA
//
// Created by MacBook Pro on 13/06/24.
//
import UIKit
class FavouriteCell: UICollectionViewCell {
@IBOutlet weak var cellImage: UIImageView!
@IBOutlet weak var cellTitle: UILabel!
@IBOutlet weak var likeBtn: UIButton!
@IBOutlet weak var favBtnn: UIButton!
@IBOutlet weak var totalLikes: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
func setData(data : FavouriteListingDM.ResultData.ShowDatum){
//heart.fill , heart , hand.thumbsup.fill , hand.thumbsup
cellTitle.text = data.title
totalLikes.text = data.likesCount?.toString() ?? "0"
if let url = data.thumbnailPath{
cellImage.imageURL(url)
}
if let favourite = data.markAsFavourite{
switch favourite{
case true:
favBtnn.setImage(UIImage(systemName: "heart.fill"), for: .normal)
case false:
favBtnn.setImage(UIImage(systemName: "heart"), for: .normal)
}
}
if let like = data.isLiked{
switch like{
case true:
likeBtn.setImage(UIImage(systemName: "hand.thumbsup.fill"), for: .normal)
case false:
likeBtn.setImage(UIImage(systemName: "hand.thumbsup"), for: .normal)
}
}
}
func setOtherData(data : FavouriteListingDM.ResultData.Datum){
//heart.fill , heart , hand.thumbsup.fill , hand.thumbsup
cellTitle.text = data.title
totalLikes.text = data.likesCount?.toString() ?? "0"
if let url = data.thumbnailPath{
cellImage.imageURL(url)
}
if let favourite = data.markAsFavourite{
switch favourite{
case true:
favBtnn.setImage(UIImage(systemName: "heart.fill"), for: .normal)
case false:
favBtnn.setImage(UIImage(systemName: "heart"), for: .normal)
}
}
if let like = data.isLiked{
switch like{
case true:
likeBtn.setImage(UIImage(systemName: "hand.thumbsup.fill"), for: .normal)
case false:
likeBtn.setImage(UIImage(systemName: "hand.thumbsup"), for: .normal)
}
}
}
}

View File

@@ -0,0 +1,134 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<customFonts key="customFonts">
<array key="Exo2-Bold.ttf">
<string>Exo2-Bold</string>
</array>
</customFonts>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="FavouriteCell" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="484" height="299"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="484" height="299"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Jur-z4-Lbx">
<rect key="frame" x="0.0" y="0.0" width="484" height="299"/>
<subviews>
<stackView opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" axis="vertical" spacing="3" translatesAutoresizingMaskIntoConstraints="NO" id="P6H-iL-C1j">
<rect key="frame" x="10" y="10" width="464" height="279"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Yqb-Mj-Uba">
<rect key="frame" x="10" y="59" width="444" height="148"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="5"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</imageView>
<stackView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" distribution="equalSpacing" alignment="bottom" translatesAutoresizingMaskIntoConstraints="NO" id="5Fg-kv-VfG">
<rect key="frame" x="10" y="210" width="444" height="35"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oRP-Fz-UDh">
<rect key="frame" x="0.0" y="19.333333333333343" width="34" height="15.666666666666664"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" alignment="bottom" spacing="7" translatesAutoresizingMaskIntoConstraints="NO" id="HGJ-7n-Ypy">
<rect key="frame" x="385.33333333333331" y="13" width="58.666666666666686" height="22"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="8wE-gW-chr">
<rect key="frame" x="0.0" y="0.0" width="29.666666666666668" height="22"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oMw-mq-dfy">
<rect key="frame" x="0.0" y="0.0" width="22" height="22"/>
<constraints>
<constraint firstAttribute="width" secondItem="oMw-mq-dfy" secondAttribute="height" multiplier="1:1" id="NJb-wA-wkp"/>
</constraints>
<color key="tintColor" name="TextDarkBlue"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="hand.thumbsup.fill" catalog="system"/>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CoX-fq-NYx">
<rect key="frame" x="24" y="0.0" width="5.6666666666666679" height="22"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DPV-BO-ggp">
<rect key="frame" x="36.666666666666686" y="0.0" width="22" height="22"/>
<constraints>
<constraint firstAttribute="width" secondItem="DPV-BO-ggp" secondAttribute="height" multiplier="1:1" id="4MG-wK-TWP"/>
</constraints>
<color key="tintColor" name="TextDarkBlue"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="heart.fill" catalog="system"/>
</button>
</subviews>
</stackView>
</subviews>
<constraints>
<constraint firstAttribute="height" constant="35" id="UXx-fJ-viE"/>
</constraints>
</stackView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<edgeInsets key="layoutMargins" top="10" left="10" bottom="10" right="10"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="5"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="P6H-iL-C1j" firstAttribute="leading" secondItem="Jur-z4-Lbx" secondAttribute="leading" constant="10" id="FUM-T4-AEc"/>
<constraint firstAttribute="trailing" secondItem="P6H-iL-C1j" secondAttribute="trailing" constant="10" id="I08-u5-GC7"/>
<constraint firstAttribute="bottom" secondItem="P6H-iL-C1j" secondAttribute="bottom" constant="10" id="YeD-vX-DD9"/>
<constraint firstItem="P6H-iL-C1j" firstAttribute="top" secondItem="Jur-z4-Lbx" secondAttribute="top" constant="10" id="e7f-bE-oZr"/>
</constraints>
</view>
</subviews>
</view>
<viewLayoutGuide key="safeArea" id="ZTg-uK-7eu"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="Jur-z4-Lbx" secondAttribute="trailing" id="JCW-dx-f3v"/>
<constraint firstAttribute="bottom" secondItem="Jur-z4-Lbx" secondAttribute="bottom" id="f8F-nN-bWb"/>
<constraint firstItem="Jur-z4-Lbx" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="ncP-lg-MIS"/>
<constraint firstItem="Jur-z4-Lbx" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="o02-CR-MEs"/>
</constraints>
<size key="customSize" width="484" height="299"/>
<connections>
<outlet property="cellImage" destination="Yqb-Mj-Uba" id="cLw-iu-FHa"/>
<outlet property="cellTitle" destination="oRP-Fz-UDh" id="VKb-eW-uDZ"/>
<outlet property="favBtnn" destination="DPV-BO-ggp" id="gHz-f2-4K5"/>
<outlet property="likeBtn" destination="oMw-mq-dfy" id="Jaz-7z-3Vw"/>
<outlet property="totalLikes" destination="CoX-fq-NYx" id="xQO-b0-Eb7"/>
</connections>
<point key="canvasLocation" x="535.87786259541986" y="131.33802816901408"/>
</collectionViewCell>
</objects>
<resources>
<image name="hand.thumbsup.fill" catalog="system" width="128" height="121"/>
<image name="heart.fill" catalog="system" width="128" height="107"/>
<namedColor name="TextDarkBlue">
<color red="0.10599999874830246" green="0.050999999046325684" blue="0.60399997234344482" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>

View File

@@ -0,0 +1,92 @@
//
// MyListVM.swift
// WOKA
//
// Created by MacBook Pro on 13/06/24.
//
import Foundation
import Alamofire
class MyListVM{
weak var vc : MyListVC!
var favListingData : FavouriteListingDM.ResultData?
var webSeriesHindi = [FavouriteListingDM.ResultData.ShowDatum]()
func initView(){
setupCell()
getFavouriteListing()
}
func setupCell(){
vc.webSeriesCV.register(UINib(nibName: K.CellIdentifier.Home.favouriteCell, bundle: nil), forCellWithReuseIdentifier: K.CellIdentifier.Home.favouriteCell)
vc.webSeriesCV.delegate = vc.self
vc.webSeriesCV.dataSource = vc.self
vc.webSeriesHindiCV.register(UINib(nibName: K.CellIdentifier.Home.favouriteCell, bundle: nil), forCellWithReuseIdentifier: K.CellIdentifier.Home.favouriteCell)
vc.webSeriesHindiCV.delegate = vc.self
vc.webSeriesHindiCV.dataSource = vc.self
vc.audioBooksCV.register(UINib(nibName: K.CellIdentifier.Home.favouriteCell, bundle: nil), forCellWithReuseIdentifier: K.CellIdentifier.Home.favouriteCell)
vc.audioBooksCV.delegate = vc.self
vc.audioBooksCV.dataSource = vc.self
vc.karaokeCV.register(UINib(nibName: K.CellIdentifier.Home.favouriteCell, bundle: nil), forCellWithReuseIdentifier: K.CellIdentifier.Home.favouriteCell)
vc.karaokeCV.delegate = vc.self
vc.karaokeCV.dataSource = vc.self
vc.gamesCV.register(UINib(nibName: K.CellIdentifier.Home.favouriteCell, bundle: nil), forCellWithReuseIdentifier: K.CellIdentifier.Home.favouriteCell)
vc.gamesCV.delegate = vc.self
vc.gamesCV.dataSource = vc.self
}
// MARK: - Get Favourite Listing
func getFavouriteListing(){
Utilities.startProgressHUD()
let headers : HTTPHeaders = ["Accept-Language" : AuthFunc.shareInstance.languageSelected == .english ? "English" : "Hindi",
"access-token": AuthFunc.shareInstance.getAccessToken()]
NetworkManager.shareInstance.apiRequest(url: APIEndPoints.Home.favourite_listing, method: .post, headers: headers) { [weak self](result : Result<BaseResponseModel<FavouriteListingDM>, NetworkManager.APIError>) in
switch result{
case .success(let data):
guard let self else{return}
switch data.success{
case 0:
Utilities.dismissProgressHUD()
self.vc.toast(msg: data.message ?? "Unrecognised error" , time: 2)
case 1:
Utilities.dismissProgressHUD()
guard let data = data.data?.result else{return}
favListingData = data
if var hindiData = favListingData?.showData{
/*
Taking out the hindi series , 1-> English , 18-> Hindi
And the saving it to hindi series
*/
webSeriesHindi = hindiData.compactMap { $0 }.filter { $0.bookmarkCategoryIDS == "18" }
// Deleting the hindi series from main (those with category ID "18")
hindiData.removeAll { $0.bookmarkCategoryIDS == "18" }
// Updating the showData with the filtered list
favListingData?.showData = hindiData
}
vc.webSeriesCV.reloadData()
vc.webSeriesHindiCV.reloadData()
vc.audioBooksCV.reloadData()
vc.karaokeCV.reloadData()
vc.gamesCV.reloadData()
default:
break
}
case .failure(let error):
guard let self else{return}
Utilities.dismissProgressHUD()
self.vc.toast(msg: error.localizedDescription , time: 2)
}
}
}
}

View File

@@ -9,7 +9,6 @@ import UIKit
import Lottie
import IQKeyboardManagerSwift
import JWPlayerKit
import AVFAudio
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
@@ -41,20 +40,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
configureSideBar()
JWPlayerKitLicense.setLicenseKey("Lgok1t7H4PKY+M8FZqmCx54ibUF+NeCTn+xgd+/LVTaRdc+L")
setupAudioSession()
return true
}
func setupAudioSession() {
let session = AVAudioSession.sharedInstance()
do {
try session.setCategory(.playback, mode: .default)
try session.setActive(true)
} catch {
print("Failed to set up audio session")
}
}
// var myOrientation: UIInterfaceOrientationMask = .portrait
//

View File

@@ -67,6 +67,8 @@ struct APIEndPoints {
struct Home{
static let blogs = makeURL(path: "blogs")
static let song_listing = makeURL(path: "song_listing")
static let get_user_notifications = makeURL(path: "get_user_notifications")
static let favourite_listing = makeURL(path: "favourite_listing")
}
// Other endpoint categories...

View File

@@ -4,6 +4,7 @@
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<capability name="Image references" minToolsVersion="12.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -72,6 +73,9 @@
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="FM"/>
<connections>
<action selector="radioBtnTapped:" destination="VXi-XB-hOy" eventType="touchUpInside" id="NwC-rN-yq7"/>
</connections>
</button>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="sf9-me-n7i" userLabel="Avatar Stack">
<rect key="frame" x="109" y="64" width="175" height="101"/>
@@ -185,6 +189,9 @@
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="15"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="Notification"/>
<connections>
<action selector="notificationBtnTapped:" destination="VXi-XB-hOy" eventType="touchUpInside" id="Lbi-10-4pY"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="twV-da-k4L">
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
@@ -481,26 +488,31 @@
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="U0W-18-4oe">
<rect key="frame" x="0.0" y="45" width="393" height="214"/>
<rect key="frame" x="0.0" y="45" width="393" height="204"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Coming Soon on WOKA" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="D2p-c5-usH" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="10" y="10" width="373" height="14"/>
<rect key="frame" x="10" y="10" width="373" height="4"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="20"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UKc-92-GPa">
<rect key="frame" x="10" y="34" width="373" height="180"/>
<rect key="frame" x="10" y="24" width="373" height="180"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="180" id="gwN-aD-t1t"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="5"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<edgeInsets key="layoutMargins" top="10" left="10" bottom="0.0" right="10"/>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="Qcq-yj-AzB">
<rect key="frame" x="0.0" y="259" width="393" height="199"/>
<rect key="frame" x="0.0" y="249" width="393" height="209"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="BLOGS" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lW0-W4-2hl" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="10" y="10" width="373" height="24"/>
@@ -509,10 +521,10 @@
<nil key="highlightedColor"/>
</label>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="xup-gW-Kjh">
<rect key="frame" x="10" y="39" width="373" height="160"/>
<rect key="frame" x="10" y="39" width="373" height="170"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="160" id="fTZ-PQ-nXX"/>
<constraint firstAttribute="height" constant="170" id="fTZ-PQ-nXX"/>
</constraints>
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="10" minimumInteritemSpacing="10" id="6G1-Uh-Pwt">
<size key="itemSize" width="128" height="128"/>
@@ -567,6 +579,36 @@
</objects>
<point key="canvasLocation" x="2195" y="-872"/>
</scene>
<!--User NotificationVC-->
<scene sceneID="VA9-b8-0MB">
<objects>
<viewController storyboardIdentifier="UserNotificationVC" id="GSM-1I-akm" customClass="UserNotificationVC" customModule="WOKA" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="U8N-8z-auR">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="4Jz-rO-ToO">
<rect key="frame" x="0.0" y="59" width="393" height="759"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</tableView>
</subviews>
<viewLayoutGuide key="safeArea" id="HwS-aW-IIl"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="4Jz-rO-ToO" firstAttribute="leading" secondItem="HwS-aW-IIl" secondAttribute="leading" id="Pwc-fY-ijS"/>
<constraint firstItem="HwS-aW-IIl" firstAttribute="trailing" secondItem="4Jz-rO-ToO" secondAttribute="trailing" id="pPA-fS-veG"/>
<constraint firstItem="HwS-aW-IIl" firstAttribute="bottom" secondItem="4Jz-rO-ToO" secondAttribute="bottom" id="x2e-Ns-hm9"/>
<constraint firstItem="4Jz-rO-ToO" firstAttribute="top" secondItem="HwS-aW-IIl" secondAttribute="top" id="zIS-dJ-FOj"/>
</constraints>
</view>
<connections>
<outlet property="tableView" destination="4Jz-rO-ToO" id="AgO-yU-AtX"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="fQe-k9-g2B" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2882" y="-873"/>
</scene>
<!--Theme TwoVC-->
<scene sceneID="lyh-UP-4KB">
<objects>
@@ -729,6 +771,65 @@
</objects>
<point key="canvasLocation" x="3599" y="-1602"/>
</scene>
<!--RadioVC-->
<scene sceneID="dii-N7-875">
<objects>
<viewController storyboardIdentifier="RadioVC" id="fGC-fP-40a" customClass="RadioVC" customModule="WOKA" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="S0N-Oh-Xhi">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view alpha="0.59999999999999998" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4aH-k1-gGq">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="izq-sA-AUu">
<rect key="frame" x="348" y="487" width="40" height="40"/>
<constraints>
<constraint firstAttribute="width" constant="40" id="1tD-Tm-JF9"/>
<constraint firstAttribute="height" constant="40" id="uVI-tC-lZG"/>
</constraints>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal">
<imageReference key="image" image="xmark.circle" catalog="system" symbolScale="large"/>
</state>
<connections>
<action selector="closeBtnTapped:" destination="fGC-fP-40a" eventType="touchUpInside" id="TF3-Uh-JVW"/>
</connections>
</button>
<wkWebView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5Tw-fv-8la">
<rect key="frame" x="0.0" y="532" width="393" height="320"/>
<color key="backgroundColor" red="0.36078431370000003" green="0.38823529410000002" blue="0.4039215686" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<wkWebViewConfiguration key="configuration">
<audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/>
<wkPreferences key="preferences"/>
</wkWebViewConfiguration>
</wkWebView>
</subviews>
<viewLayoutGuide key="safeArea" id="E00-Ja-yNG"/>
<constraints>
<constraint firstItem="5Tw-fv-8la" firstAttribute="height" secondItem="S0N-Oh-Xhi" secondAttribute="height" multiplier="0.375587" id="4J3-yZ-Re3"/>
<constraint firstItem="4aH-k1-gGq" firstAttribute="top" secondItem="S0N-Oh-Xhi" secondAttribute="top" id="HHS-YU-YlI"/>
<constraint firstAttribute="bottom" secondItem="4aH-k1-gGq" secondAttribute="bottom" id="MtA-JI-lfu"/>
<constraint firstItem="E00-Ja-yNG" firstAttribute="trailing" secondItem="5Tw-fv-8la" secondAttribute="trailing" id="SGi-yS-Cli"/>
<constraint firstItem="5Tw-fv-8la" firstAttribute="top" secondItem="izq-sA-AUu" secondAttribute="bottom" constant="5" id="T1q-pM-06S"/>
<constraint firstItem="4aH-k1-gGq" firstAttribute="leading" secondItem="E00-Ja-yNG" secondAttribute="leading" id="UA3-sZ-a2e"/>
<constraint firstItem="E00-Ja-yNG" firstAttribute="trailing" secondItem="izq-sA-AUu" secondAttribute="trailing" constant="5" id="dRx-0c-75T"/>
<constraint firstAttribute="bottom" secondItem="5Tw-fv-8la" secondAttribute="bottom" id="rso-Ao-8h1"/>
<constraint firstItem="4aH-k1-gGq" firstAttribute="trailing" secondItem="E00-Ja-yNG" secondAttribute="trailing" id="wVA-Zv-vtn"/>
<constraint firstItem="5Tw-fv-8la" firstAttribute="leading" secondItem="E00-Ja-yNG" secondAttribute="leading" id="zEA-14-fa9"/>
</constraints>
</view>
<connections>
<outlet property="backView" destination="4aH-k1-gGq" id="A7Q-3J-MgE"/>
<outlet property="webView" destination="5Tw-fv-8la" id="9uS-Wn-Y4p"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="fpK-Ec-nbT" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="3598" y="-873"/>
</scene>
</scenes>
<resources>
<image name="AudioBooks" width="172" height="120"/>
@@ -753,6 +854,7 @@
<image name="Star" width="62.666667938232422" height="62.666667938232422"/>
<image name="UpArrowMore" width="25" height="25"/>
<image name="WebSeries" width="164" height="118.66666412353516"/>
<image name="xmark.circle" catalog="system" width="128" height="123"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>

View File

@@ -0,0 +1,48 @@
//
// CommonNwCall.swift
// WOKA
//
// Created by MacBook Pro on 13/06/24.
//
import UIKit
import Alamofire
class CommonNwCall{
static let shareInstance = CommonNwCall()
var userNotification = [UserNotificationDM]()
func getUserNotification(vc : UIViewController , isRefreshing : Bool? = nil, completion : @escaping (Bool) -> Void){
if isRefreshing == false || isRefreshing == nil{
Utilities.startProgressHUD()
}
let headers : HTTPHeaders = ["access-token" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3dva2FsYW5kLmNvbS9hZG1pbi9hcGkvbG9naW4iLCJpYXQiOjE3MTgxODgwNTMsImV4cCI6MTc0OTcyNDA1MywibmJmIjoxNzE4MTg4MDUzLCJqdGkiOiJaNHIyVTlPYUxZanlDZm1TIiwic3ViIjoiMjE2IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.09oMvLmPaSzSqI7tQTs0VblGeRxDYYdh4Bt-2z1RTKg"]
NetworkManager.shareInstance.apiRequest(url: APIEndPoints.Home.get_user_notifications, method: .get,headers : headers) {(result : Result<BaseResponseModel<[UserNotificationDM]>, NetworkManager.APIError>) in
switch result{
case .success(let data):
switch data.success{
case 0:
/*
Error
*/
Utilities.dismissProgressHUD()
vc.toast(msg: data.message ?? "Unrecognised error" , time: 2)
completion(false)
case 1:
Utilities.dismissProgressHUD()
guard let data = data.data else{return}
self.userNotification.append(contentsOf: data)
//Fetched Blogs
completion(true)
default:
completion(false)
}
case .failure(let error):
Utilities.dismissProgressHUD()
vc.toast(msg: error.localizedDescription , time: 2)
completion(false)
}
}
}
}

View File

@@ -40,7 +40,7 @@ extension MoreVC : TableViewSRC{
let cell = tableView.dequeueReusableCell(withIdentifier: "SongListCell", for: indexPath) as! SongListCell
let songData = vm.songData[indexPath.row]
let isActive = (indexPath.row == vm.currentIndexPlayingSong)
// let isActive = (indexPath.row == vm.currentIndexPlayingSong)
if let index = vm.currentIndexPlayingSong , index == indexPath.row{
cell.setData(data: songData,playerStatus: vm.playerStatus, active: true, currentTime: currentTimePlayer)
}else{
@@ -223,11 +223,11 @@ extension MoreVC : UICollectionViewDelegateFlowLayout{
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
let itemsPerRow: CGFloat = 2
let itemsPerRow: CGFloat = 2.2
let paddingSpace = 5 * (itemsPerRow + 1)
let availableWidth = collectionView.frame.width - paddingSpace
let widthPerItem = availableWidth / itemsPerRow
return CGSize(width: widthPerItem, height: widthPerItem - 20)
return CGSize(width: widthPerItem, height: widthPerItem)
}
}

View File

@@ -0,0 +1,60 @@
//
// RadioVC.swift
// WOKA
//
// Created by MacBook Pro on 13/06/24.
//
import UIKit
import WebKit
class RadioVC: UIViewController {
@IBOutlet weak var webView: WKWebView!
var url = "https://wokastaging.in/api/woka_fm"
@IBOutlet weak var backView: UIView!
deinit {
unloadWebView()
}
override func viewDidLoad() {
super.viewDidLoad()
let radioURL = URL(string: url)!
let request = URLRequest(url: radioURL)
webView.load(request)
backView.addTapGesture {
self.dismiss(animated: true) {
self.unloadWebView()
}
}
}
override func viewDidDisappear(_ animated: Bool) {
webView.stopLoading()
}
@IBAction func closeBtnTapped(_ sender: UIButton) {
self.dismiss(animated: true) {
self.unloadWebView()
}
}
func unloadWebView() {
// Cancel any ongoing navigation
webView.stopLoading()
// Set delegates to nil
webView.navigationDelegate = nil
webView.uiDelegate = nil
// Remove from superview
webView.removeFromSuperview()
// Release the web view
webView = nil
}
}

View File

@@ -69,6 +69,23 @@ class ThemeOneVC: UIViewController {
self.sideMenuController?.revealMenu()
}
@IBAction func notificationBtnTapped(_ sender: UIButton) {
CommonNwCall.shareInstance.getUserNotification(vc: self) { isDone in
if isDone{
let sb = UIStoryboard(name: K.StoryBoard.theme, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Home.userNotificationVC) as! UserNotificationVC
self.navigationController?.pushViewController(vcPush, animated: true)
}
}
}
@IBAction func radioBtnTapped(_ sender: UIButton) {
let sb = UIStoryboard(name: K.StoryBoard.theme, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Theme.radioVC) as! RadioVC
vcPush.modalPresentationStyle = .overCurrentContext
vcPush.modalTransitionStyle = .crossDissolve
self.present(vcPush, animated: true)
}
}

View File

@@ -0,0 +1,79 @@
//
// UserNotificationVC.swift
// WOKA
//
// Created by MacBook Pro on 13/06/24.
//
import UIKit
class UserNotificationVC: UIViewController {
@IBOutlet weak var tableView: UITableView!
let refreshControl = UIRefreshControl()
let feedbackGenerator = UIImpactFeedbackGenerator(style: .light)
override func viewDidLoad() {
super.viewDidLoad()
let color1 = #colorLiteral(red: 0.05490196078, green: 0.01176470588, blue: 0.3882352941, alpha: 1)
let color2 = #colorLiteral(red: 0.2041364683, green: 0.156624428, blue: 0.5904380268, alpha: 1)
self.view.applyMultiGradient(colors: [color1, color2,color1], startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0, y: 0.8))
self.title = "NOTIFICATIONS"
setupCell()
navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
navigationController?.navigationBar.shadowImage = UIImage()
self.navigationController?.setColor(color: .white)
//Adding pull to Refresh
refreshControl.attributedTitle = NSAttributedString(string: "Refreshing...",attributes: [.foregroundColor: UIColor.white])
refreshControl.tintColor = .white
refreshControl.addTarget(self, action: #selector(self.refresh(_:)), for: .valueChanged)
tableView.addSubview(refreshControl)
}
// MARK: - Pull to refresh
@objc func refresh(_ sender: AnyObject) {
CommonNwCall.shareInstance.getUserNotification(vc: self,isRefreshing: true) { [weak self] isDone in
guard let self else{return}
feedbackGenerator.impactOccurred()
tableView.reloadData()
refreshControl.endRefreshing()
}
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.setNavigationBarHidden(false, animated: animated)
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
navigationController?.setNavigationBarHidden(true, animated: animated)
self.navigationController?.setColor(color: .black)
}
func setupCell(){
tableView.register(UINib(nibName: K.CellIdentifier.Home.userNotificationCell, bundle: nil), forCellReuseIdentifier: K.CellIdentifier.Home.userNotificationCell)
tableView.delegate = self
tableView.dataSource = self
}
}
// MARK: - TableView DataSource , Delegates
extension UserNotificationVC : TableViewSRC{
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return CommonNwCall.shareInstance.userNotification.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: K.CellIdentifier.Home.userNotificationCell) as! UserNotificationCell
let data = CommonNwCall.shareInstance.userNotification[indexPath.row]
cell.setData(data: data)
return cell
}
}

View File

@@ -0,0 +1,27 @@
//
// UserNotificationDM.swift
// WOKA
//
// Created by MacBook Pro on 13/06/24.
//
import Foundation
// MARK: - UserNotificationDM
struct UserNotificationDM: Codable {
let id, userID, postType: Int?
let title, type, description, createdAt: String?
let image: String?
let link: String?
let isRead: Int?
enum CodingKeys: String, CodingKey {
case id
case userID = "user_id"
case postType = "post_type"
case title, type, description
case createdAt = "created_at"
case image, link
case isRead = "is_read"
}
}

View File

@@ -16,30 +16,35 @@
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="BlogsCell" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="244" height="210"/>
<rect key="frame" x="0.0" y="0.0" width="244" height="173"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="244" height="210"/>
<rect key="frame" x="0.0" y="0.0" width="244" height="173"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3AV-Ja-CkX">
<rect key="frame" x="10" y="10" width="224" height="190"/>
<rect key="frame" x="10" y="10" width="224" height="153"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="hSt-Vr-ywX">
<rect key="frame" x="10" y="10" width="204" height="170"/>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="3" translatesAutoresizingMaskIntoConstraints="NO" id="hSt-Vr-ywX">
<rect key="frame" x="10" y="10" width="204" height="133"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="5yh-us-azT">
<rect key="frame" x="0.0" y="0.0" width="204" height="90"/>
<color key="backgroundColor" red="0.5450980392" green="0.67450980390000004" blue="0.17254901959999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="90" id="LZS-Hb-uCN"/>
</constraints>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="5yh-us-azT">
<rect key="frame" x="0.0" y="0.0" width="204" height="75"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="5"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</imageView>
<stackView opaque="NO" contentMode="scaleToFill" alignment="top" translatesAutoresizingMaskIntoConstraints="NO" id="qgR-zD-wKz">
<rect key="frame" x="0.0" y="95" width="204" height="75"/>
<stackView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" alignment="top" translatesAutoresizingMaskIntoConstraints="NO" id="qgR-zD-wKz">
<rect key="frame" x="0.0" y="78" width="204" height="55"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FXy-A6-Huz">
<rect key="frame" x="0.0" y="0.0" width="204" height="47"/>
<rect key="frame" x="0.0" y="0.0" width="204" height="55"/>
<constraints>
<constraint firstAttribute="height" constant="55" id="Sue-yy-eDZ"/>
</constraints>
<string key="text">Label
Label
Label</string>
@@ -70,13 +75,13 @@ Label</string>
<constraint firstItem="3AV-Ja-CkX" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="10" id="cVZ-vU-0kW"/>
<constraint firstAttribute="bottom" secondItem="3AV-Ja-CkX" secondAttribute="bottom" constant="10" id="r6I-Bo-Yk3"/>
</constraints>
<size key="customSize" width="244" height="210"/>
<size key="customSize" width="244" height="173"/>
<connections>
<outlet property="blogImage" destination="5yh-us-azT" id="7V0-Ce-aFs"/>
<outlet property="blogTitle" destination="FXy-A6-Huz" id="4ix-kM-Trx"/>
<outlet property="outerView" destination="3AV-Ja-CkX" id="Tn6-Lq-0ST"/>
</connections>
<point key="canvasLocation" x="277.86259541984731" y="45.070422535211272"/>
<point key="canvasLocation" x="277.86259541984731" y="32.04225352112676"/>
</collectionViewCell>
</objects>
</document>

View File

@@ -0,0 +1,51 @@
//
// UserNotificationCell.swift
// WOKA
//
// Created by MacBook Pro on 13/06/24.
//
import UIKit
class UserNotificationCell: UITableViewCell {
@IBOutlet weak var notificationDate: UILabel!
@IBOutlet weak var notificationDesc: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
func setData(data : UserNotificationDM){
if let dateStr = data.createdAt, let date = DateFormatterLib.dateMods(dateStr: dateStr, dateCurrentFormat: .yyyy_MM_ddTHH_mm_ss_ssZ, dateReturnFormat: .yyyy_MM_ddTHH_mm_ss_ssZ, stringOrDate: .date).1{
let currentDate = Date()
// Calculate the difference in days
let calendar = Calendar.current
let dateComponents = calendar.dateComponents([.day], from: currentDate, to: date)
if let daysDifference = dateComponents.day {
let datePositive = abs(daysDifference)
if datePositive == 0{
notificationDate.text = "Today"
}else if datePositive == 1{
notificationDate.text = "Yesterday"
}else{
notificationDate.text = datePositive.toString() + " days ago"
}
} else {
notificationDate.text = "0 days ago"
}
}
notificationDesc.text = data.title
}
}

View File

@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<customFonts key="customFonts">
<array key="Exo2-Regular.ttf">
<string>Exo2-Regular</string>
</array>
<array key="Exo2-SemiBold.ttf">
<string>Exo2-SemiBold</string>
</array>
</customFonts>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="110" id="KGk-i7-Jjw" customClass="UserNotificationCell" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="343" height="110"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="343" height="110"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="6" translatesAutoresizingMaskIntoConstraints="NO" id="dNi-Le-ufz">
<rect key="frame" x="15" y="10" width="313" height="90"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="Text" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pKf-jD-jhn">
<rect key="frame" x="10" y="10" width="293" height="15.666666666666664"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="13"/>
<color key="textColor" name="TextDarkBlue"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="Text" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YAV-c2-9OX">
<rect key="frame" x="10" y="31.666666666666661" width="293" height="48.333333333333343"/>
<fontDescription key="fontDescription" name="Exo2-SemiBold" family="Exo 2" pointSize="15"/>
<color key="textColor" name="TextDarkBlue"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<edgeInsets key="layoutMargins" top="10" left="10" bottom="10" right="10"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="5"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</stackView>
</subviews>
<constraints>
<constraint firstItem="dNi-Le-ufz" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="10" id="Kwz-Ex-7Mw"/>
<constraint firstAttribute="trailing" secondItem="dNi-Le-ufz" secondAttribute="trailing" constant="15" id="P2j-5e-6m4"/>
<constraint firstAttribute="bottom" secondItem="dNi-Le-ufz" secondAttribute="bottom" constant="10" id="Vwc-dO-yEh"/>
<constraint firstItem="dNi-Le-ufz" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="oJO-QP-iVx"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="notificationDate" destination="pKf-jD-jhn" id="o8o-cJ-Hxi"/>
<outlet property="notificationDesc" destination="YAV-c2-9OX" id="VCq-BY-axb"/>
</connections>
<point key="canvasLocation" x="156.4885496183206" y="42.95774647887324"/>
</tableViewCell>
</objects>
<resources>
<namedColor name="TextDarkBlue">
<color red="0.10599999874830246" green="0.050999999046325684" blue="0.60399997234344482" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>

View File

@@ -35,6 +35,7 @@ class MoreVM{
func initView(){
getBLogs()
setupAudioSession()
getSong()
setupCell()
vc.songTableView.showsVerticalScrollIndicator = false
@@ -44,6 +45,17 @@ class MoreVM{
}
}
func setupAudioSession() {
let session = AVAudioSession.sharedInstance()
do {
try session.setCategory(.playback, mode: .default)
try session.setActive(true)
} catch {
print("Failed to set up audio session")
}
}
func observePlayer() {
playerObserver = self.player?.observe(\.timeControlStatus, options: [.new, .old], changeHandler: { [weak self] player, change in
guard let self = self else { return }

View File

@@ -36,8 +36,6 @@ class ThemeOneVM{
vc.nameLabel.setContentHuggingPriority(.fittingSizeLevel, for: .horizontal)
vc.nameLabel.setContentCompressionResistancePriority(.fittingSizeLevel, for: .horizontal)
}
private func handleNotificationCenter(){