added navigations

This commit is contained in:
Bilal
2024-07-25 01:03:19 +05:30
parent bb68fa1e3c
commit f9ff1f4114
14 changed files with 273 additions and 41 deletions

View File

@@ -232,6 +232,7 @@
9C27E16F2BDB866500EC1DA9 /* CellIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C27E16E2BDB866500EC1DA9 /* CellIdentifier.swift */; };
9C27E1722BDB86B600EC1DA9 /* OnBoardCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C27E1702BDB86B600EC1DA9 /* OnBoardCell.swift */; };
9C27E1732BDB86B600EC1DA9 /* OnBoardCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9C27E1712BDB86B600EC1DA9 /* OnBoardCell.xib */; };
9C3E14472C517E8F00D06C10 /* TopViewEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C3E14462C517E8F00D06C10 /* TopViewEnum.swift */; };
9C535DB52C005A6D00DA6DCD /* KeyWindowFix.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C535DB42C005A6C00DA6DCD /* KeyWindowFix.swift */; };
9C535DB82C0089B400DA6DCD /* ViewButtonAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C535DB72C0089B400DA6DCD /* ViewButtonAnimation.swift */; };
9C535DC02C00B36000DA6DCD /* HomeVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C535DBF2C00B36000DA6DCD /* HomeVC.swift */; };
@@ -552,6 +553,7 @@
9C27E16E2BDB866500EC1DA9 /* CellIdentifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CellIdentifier.swift; sourceTree = "<group>"; };
9C27E1702BDB86B600EC1DA9 /* OnBoardCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnBoardCell.swift; sourceTree = "<group>"; };
9C27E1712BDB86B600EC1DA9 /* OnBoardCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = OnBoardCell.xib; sourceTree = "<group>"; };
9C3E14462C517E8F00D06C10 /* TopViewEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TopViewEnum.swift; sourceTree = "<group>"; };
9C535DB42C005A6C00DA6DCD /* KeyWindowFix.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyWindowFix.swift; sourceTree = "<group>"; };
9C535DB72C0089B400DA6DCD /* ViewButtonAnimation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewButtonAnimation.swift; sourceTree = "<group>"; };
9C535DBF2C00B36000DA6DCD /* HomeVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeVC.swift; sourceTree = "<group>"; };
@@ -1274,6 +1276,7 @@
525954182BE8CC3400191286 /* ConstantString.swift */,
524C42302C0499560016A11C /* NotificationCenterReloads.swift */,
9C8C4FAF2C1328060017DD3B /* Disclaimer.rtf */,
9C3E14462C517E8F00D06C10 /* TopViewEnum.swift */,
);
path = "Constants K";
sourceTree = "<group>";
@@ -1942,6 +1945,7 @@
52B8D4DF2C04A25E00ED65F3 /* StatusBar.swift in Sources */,
5259541D2BE8D94400191286 /* QueueHelper.swift in Sources */,
525954232BE8F00400191286 /* BaseResponseModel.swift in Sources */,
9C3E14472C517E8F00D06C10 /* TopViewEnum.swift in Sources */,
525861E02C4FF16700C33C79 /* CouponApplyDM.swift in Sources */,
52A6DCB42C4E73F100F63C51 /* ShopProductsVM.swift in Sources */,
9C27E1692BDB76F200EC1DA9 /* OnBoardVM.swift in Sources */,

View File

@@ -12,6 +12,6 @@ extension K{
struct GVar{
// static var localized = K.LocalizedEnum.english
static var reloadMyList = false
static var topView = TopViewEnum.theme1
}
}

View File

@@ -11,5 +11,8 @@ extension K{
struct NotificationCenterReloads{
static var reloadTheme = "ReloadTheme"
static var themeOnePush = "ThemeOnePush"
static var themeTwoPush = "ThemeTwoPush"
static var myListPush = "MyListPush"
}
}

View File

@@ -0,0 +1,19 @@
//
// TopViewEnum.swift
// WOKA
//
// Created by Bilal on 24/07/2024.
//
import Foundation
enum TopViewEnum{
case theme1
case theme2
case myList
}
enum TopViewPush{
case webseries
case liveTV
}

View File

@@ -15,6 +15,12 @@ class ExploreWokaVC: UIViewController {
@IBOutlet weak var wokaFmBtn: UIButton!
@IBOutlet weak var liveTvBtn: UIButton!
@IBOutlet weak var webSeriesBtn: UIButton!
@IBOutlet weak var gamesBtn: UIButton!
@IBOutlet weak var audioBookBtn: UIButton!
@IBOutlet weak var blogBtn: UIButton!
@IBOutlet weak var karaokeBtn: UIButton!
@IBOutlet weak var shopBtn: UIButton!
@IBOutlet weak var layerView: UIView!
@@ -46,14 +52,29 @@ class ExploreWokaVC: UIViewController {
switch sender{
case wokaFmBtn:
self.dismiss(animated: true) {
// 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)
if let vc = UIApplication.topViewController(){
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
vc.present(vcPush, animated: true)
}
}
case webSeriesBtn:
self.dismiss(animated: true) {
switch K.GVar.topView{
case .theme1:
NotificationCenter.default.post(name: NSNotification.Name(K.NotificationCenterReloads.themeOnePush), object: nil, userInfo: ["action": TopViewPush.webseries])
case .theme2:
NotificationCenter.default.post(name: NSNotification.Name(K.NotificationCenterReloads.themeTwoPush), object: nil, userInfo: ["action": TopViewPush.webseries])
case .myList:
NotificationCenter.default.post(name: NSNotification.Name(K.NotificationCenterReloads.myListPush), object: nil, userInfo: ["action": TopViewPush.webseries])
}
}
case liveTvBtn:
self.dismiss(animated: true)
self.dismiss(animated: true) {
NotificationCenter.default.post(name: NSNotification.Name(K.NotificationCenterReloads.themeOnePush), object: nil, userInfo: ["action": TopViewPush.liveTV])
}
default:
break
}

View File

@@ -33,6 +33,10 @@ class MyListVC: UIViewController{
var vm = MyListVM()
deinit{
NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: K.NotificationCenterReloads.myListPush), object: nil)
}
override func viewDidLoad() {
super.viewDidLoad()
vm.vc = self
@@ -63,6 +67,7 @@ class MyListVC: UIViewController{
}
override func viewDidAppear(_ animated: Bool) {
K.GVar.topView = .myList
if K.GVar.reloadMyList{
K.GVar.reloadMyList = false
Utilities.startProgressHUD()

View File

@@ -659,6 +659,9 @@
<state key="normal" title="WEB SERIES" image="WebSeriesIcon">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="btnTapped:" destination="wHe-qy-JF8" eventType="touchUpInside" id="9DX-4s-myd"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.36862745098039218" green="0.12156862745098039" blue="0.76862745098039209" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -681,6 +684,9 @@
<state key="normal" title="GAMES" image="GamesIcon">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="btnTapped:" destination="wHe-qy-JF8" eventType="touchUpInside" id="jmS-bS-CSO"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.95294117647058818" green="0.52549019607843139" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -703,6 +709,9 @@
<state key="normal" title="AUDIO BOOKS" image="AudioBookIcon">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="btnTapped:" destination="wHe-qy-JF8" eventType="touchUpInside" id="lQj-dm-0f2"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.0" green="0.47843137254901957" blue="0.75294117647058822" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -725,6 +734,9 @@
<state key="normal" title="BLOG" image="BlogsIcon">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="btnTapped:" destination="wHe-qy-JF8" eventType="touchUpInside" id="gxQ-oE-cfZ"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.0039215686274509803" green="0.60392156862745094" blue="0.29019607843137252" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -747,6 +759,9 @@
<state key="normal" title="KARAOKE" image="KaraokeIcon">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="btnTapped:" destination="wHe-qy-JF8" eventType="touchUpInside" id="3oM-d4-nYE"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.80000000000000004" green="0.29019607843137252" blue="0.10980392156862745" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -769,6 +784,9 @@
<state key="normal" title="SHOP" image="ShopIcon">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="btnTapped:" destination="wHe-qy-JF8" eventType="touchUpInside" id="gBv-U1-q7C"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.54509803921568623" green="0.67450980392156867" blue="0.17254901960784313" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -832,10 +850,16 @@
</view>
<tabBarItem key="tabBarItem" title="Item" id="waB-zL-0Fo"/>
<connections>
<outlet property="audioBookBtn" destination="Zxm-AD-QSC" id="98B-Bx-uwL"/>
<outlet property="blogBtn" destination="rry-dK-R12" id="Xhf-0D-FAU"/>
<outlet property="blurView" destination="bkq-AU-CNT" id="0nM-J2-yrv"/>
<outlet property="customView" destination="DNc-fQ-fy8" id="zKU-Vc-wBz"/>
<outlet property="extraView" destination="lxy-WU-CSd" id="ba7-wu-ZGj"/>
<outlet property="gamesBtn" destination="5de-tc-WUV" id="osP-zC-RwD"/>
<outlet property="karaokeBtn" destination="cDI-gA-Sfd" id="7gn-pm-yOY"/>
<outlet property="liveTvBtn" destination="pfM-e9-xeS" id="evM-rB-9H9"/>
<outlet property="shopBtn" destination="HH9-9q-T6X" id="Ndw-Pv-jzc"/>
<outlet property="webSeriesBtn" destination="31D-NF-WIr" id="jc9-yZ-FYG"/>
<outlet property="wokaFmBtn" destination="nOR-gr-8Ab" id="NGX-cj-tAW"/>
</connections>
</viewController>

View File

@@ -29,7 +29,8 @@ class MyListVM{
func initView(){
NotificationCenter.default.addObserver(self, selector: #selector(languageChanged), name: .languageDidChange, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(self.viewPush(notification:)), name: NSNotification.Name(rawValue: K.NotificationCenterReloads.myListPush), object: nil)
if AuthFunc.shareInstance.getUserType() == 3{ // handle guest
vc.guestLoginView.isHidden = false
vc.guestLoginStack.isHidden = false
@@ -42,6 +43,20 @@ class MyListVM{
getFavouriteListing()
}
@objc func viewPush(notification: Notification){
if let userInfo = notification.userInfo, let action = userInfo["action"] as? TopViewPush {
switch action {
case .webseries:
let sb = UIStoryboard(name: K.StoryBoard.webSeries, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.WebSeries.webSeriesVC) as! WebSeriesVC
vc.navigationController?.pushViewController(vcPush, animated: true)
case .liveTV:
break
// playLiveTV()
}
}
}
func addGradient(){
let color1 = #colorLiteral(red: 0.6745098039, green: 0.6235294118, blue: 0.1725490196, alpha: 1)
let color2 = #colorLiteral(red: 0.5450980392, green: 0.6745098039, blue: 0.1725490196, alpha: 1)

View File

@@ -237,32 +237,43 @@
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" secondItem="qS4-gX-qTX" secondAttribute="height" multiplier="1:1" id="BUX-vf-OaG"/>
<constraint firstItem="Ehe-Th-asW" firstAttribute="leading" secondItem="qS4-gX-qTX" secondAttribute="leading" id="M8B-ha-YyQ"/>
<constraint firstItem="Ehe-Th-asW" firstAttribute="top" secondItem="qS4-gX-qTX" secondAttribute="top" id="Sv2-ts-JH2"/>
<constraint firstAttribute="trailing" secondItem="Ehe-Th-asW" secondAttribute="trailing" id="als-18-0Fs"/>
<constraint firstAttribute="bottom" secondItem="Ehe-Th-asW" secondAttribute="bottom" id="wo1-7N-aJf"/>
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillProportionally" spacing="1" translatesAutoresizingMaskIntoConstraints="NO" id="lRy-nX-Xia" userLabel="LiveTV">
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="feU-AA-gLO">
<rect key="frame" x="149" y="50" width="95" height="95"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LiveTV" translatesAutoresizingMaskIntoConstraints="NO" id="LoO-Qh-9ci">
<rect key="frame" x="0.0" y="0.0" width="95" height="79"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="LIVE TV" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="arX-6A-JO0" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="79.999999999999943" width="95" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="Ff3-ym-Dew"/>
</constraints>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="13"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillProportionally" spacing="1" translatesAutoresizingMaskIntoConstraints="NO" id="lRy-nX-Xia" userLabel="LiveTV">
<rect key="frame" x="0.0" y="0.0" width="95" height="95"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LiveTV" translatesAutoresizingMaskIntoConstraints="NO" id="LoO-Qh-9ci">
<rect key="frame" x="0.0" y="0.0" width="95" height="79"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="LIVE TV" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="arX-6A-JO0" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="79.999999999999943" width="95" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="Ff3-ym-Dew"/>
</constraints>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="13"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" secondItem="lRy-nX-Xia" secondAttribute="height" multiplier="1:1" id="l2d-W3-pqP"/>
<constraint firstAttribute="bottom" secondItem="lRy-nX-Xia" secondAttribute="bottom" id="3hJ-gy-GtU"/>
<constraint firstItem="lRy-nX-Xia" firstAttribute="leading" secondItem="feU-AA-gLO" secondAttribute="leading" id="C6h-zA-8lR"/>
<constraint firstAttribute="width" secondItem="feU-AA-gLO" secondAttribute="height" multiplier="1:1" id="NtU-So-sX5"/>
<constraint firstItem="lRy-nX-Xia" firstAttribute="top" secondItem="feU-AA-gLO" secondAttribute="top" id="VIa-m2-crP"/>
<constraint firstAttribute="trailing" secondItem="lRy-nX-Xia" secondAttribute="trailing" id="era-zz-Cwi"/>
</constraints>
</stackView>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GGC-rX-Pyw">
<rect key="frame" x="10" y="75" width="95" height="95"/>
<subviews>
@@ -392,15 +403,14 @@
<constraint firstItem="gk8-xm-Hh5" firstAttribute="top" secondItem="GGC-rX-Pyw" secondAttribute="bottom" constant="30" id="6fZ-aH-GOz"/>
<constraint firstItem="GGC-rX-Pyw" firstAttribute="leading" secondItem="ppi-HI-rj1" secondAttribute="leading" constant="10" id="Go0-Ui-etR"/>
<constraint firstItem="ugr-Tf-Y1l" firstAttribute="centerY" secondItem="gk8-xm-Hh5" secondAttribute="centerY" constant="10" id="Mqx-zA-KmU"/>
<constraint firstItem="GGC-rX-Pyw" firstAttribute="centerY" secondItem="lRy-nX-Xia" secondAttribute="centerY" constant="25" id="NmB-T5-Lvq"/>
<constraint firstItem="lRy-nX-Xia" firstAttribute="height" secondItem="ppi-HI-rj1" secondAttribute="height" multiplier="0.208333" id="Slx-Jj-1Nl"/>
<constraint firstItem="feU-AA-gLO" firstAttribute="centerY" secondItem="qS4-gX-qTX" secondAttribute="centerY" constant="50" id="VEY-tc-r6X"/>
<constraint firstAttribute="trailing" secondItem="qS4-gX-qTX" secondAttribute="trailing" constant="10" id="YH1-ZC-Y0B"/>
<constraint firstItem="qS4-gX-qTX" firstAttribute="top" secondItem="ppi-HI-rj1" secondAttribute="top" id="Z3W-nR-aoM"/>
<constraint firstItem="lRy-nX-Xia" firstAttribute="centerX" secondItem="ppi-HI-rj1" secondAttribute="centerX" id="ZMq-Za-1eg"/>
<constraint firstItem="yuF-d6-Tag" firstAttribute="top" secondItem="qS4-gX-qTX" secondAttribute="bottom" constant="19.999999999999943" id="ZgC-j6-kZn"/>
<constraint firstItem="gk8-xm-Hh5" firstAttribute="leading" secondItem="ppi-HI-rj1" secondAttribute="leading" constant="10" id="c7p-1g-qdM"/>
<constraint firstItem="lRy-nX-Xia" firstAttribute="centerY" secondItem="qS4-gX-qTX" secondAttribute="centerY" constant="50" id="cWc-Gp-h6H"/>
<constraint firstItem="ugr-Tf-Y1l" firstAttribute="leading" secondItem="gk8-xm-Hh5" secondAttribute="trailing" constant="55" id="iiR-AX-YQG"/>
<constraint firstItem="feU-AA-gLO" firstAttribute="centerX" secondItem="ppi-HI-rj1" secondAttribute="centerX" id="uhu-hH-X3m"/>
<constraint firstItem="GGC-rX-Pyw" firstAttribute="centerY" secondItem="feU-AA-gLO" secondAttribute="centerY" constant="25" id="vSh-CJ-Awg"/>
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="-2" translatesAutoresizingMaskIntoConstraints="NO" id="LYo-Uy-0nM" userLabel="More">
@@ -426,6 +436,7 @@
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="tintColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="feU-AA-gLO" firstAttribute="height" secondItem="UEh-jl-IQp" secondAttribute="height" multiplier="0.111502" id="0m7-Uf-77Z"/>
<constraint firstItem="t3E-Cj-I2d" firstAttribute="top" secondItem="ppi-HI-rj1" secondAttribute="top" constant="20" id="0ma-6s-cY3"/>
<constraint firstItem="jdZ-WQ-xcr" firstAttribute="trailing" secondItem="vdl-cu-G32" secondAttribute="trailing" id="1om-dS-PtT"/>
<constraint firstItem="kzE-UE-7KK" firstAttribute="top" secondItem="sf9-me-n7i" secondAttribute="bottom" constant="30" id="2cv-dI-9b7"/>
@@ -441,7 +452,6 @@
<constraint firstItem="ppi-HI-rj1" firstAttribute="trailing" secondItem="vdl-cu-G32" secondAttribute="trailing" id="DQI-oo-bqb"/>
<constraint firstItem="ppi-HI-rj1" firstAttribute="leading" secondItem="vdl-cu-G32" secondAttribute="leading" id="DnV-cr-qUh"/>
<constraint firstItem="yuF-d6-Tag" firstAttribute="trailing" secondItem="xgH-t8-LiX" secondAttribute="trailing" constant="-5" id="DrT-s8-9xs"/>
<constraint firstItem="qS4-gX-qTX" firstAttribute="width" secondItem="UEh-jl-IQp" secondAttribute="height" multiplier="95:852" id="G3B-ar-U0R"/>
<constraint firstItem="qS4-gX-qTX" firstAttribute="height" secondItem="UEh-jl-IQp" secondAttribute="height" multiplier="0.111502" id="JKD-lf-ovJ"/>
<constraint firstAttribute="bottom" secondItem="xgH-t8-LiX" secondAttribute="bottom" id="KLp-zL-JIG"/>
<constraint firstItem="sf9-me-n7i" firstAttribute="top" secondItem="vdl-cu-G32" secondAttribute="top" constant="5" id="MnT-8w-p9T"/>
@@ -481,6 +491,7 @@
<outlet property="gradientView" destination="jdZ-WQ-xcr" id="EPt-cC-wNC"/>
<outlet property="homeGrass" destination="bNd-CB-wx1" id="Rhs-zT-ChZ"/>
<outlet property="karaokeView" destination="gk8-xm-Hh5" id="ewe-SE-uSJ"/>
<outlet property="liveTVIcon" destination="feU-AA-gLO" id="Hlu-Yc-cIp"/>
<outlet property="liveTVView" destination="kzE-UE-7KK" id="wh1-1v-X4B"/>
<outlet property="liveTvPlayer" destination="edI-4n-4AY" id="Ofv-d0-YP4"/>
<outlet property="moonImage" destination="Jbf-Kl-35X" id="WBx-uu-r3W"/>
@@ -825,7 +836,7 @@
<rect key="frame" x="0.0" y="359" width="393" height="493"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="1iA-oh-toI">
<rect key="frame" x="0.0" y="0.0" width="393" height="184"/>
<rect key="frame" x="0.0" y="0.0" width="393" height="418"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Explore WOKA" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cla-Q5-K2m" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="10" y="10" width="373" height="24"/>
@@ -847,6 +858,84 @@
</collectionViewFlowLayout>
<cells/>
</collectionView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="02e-rk-u9Q">
<rect key="frame" x="10" y="194" width="373" height="224"/>
<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="vdt-pC-uNJ" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="10" y="10" width="353" height="24"/>
<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="dj6-9c-mxm">
<rect key="frame" x="10" y="44" width="353" height="180"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="MasilaComingSoon" translatesAutoresizingMaskIntoConstraints="NO" id="l2T-ED-avg">
<rect key="frame" x="7" y="7" width="339" height="140"/>
<constraints>
<constraint firstAttribute="height" constant="140" id="XtW-7O-1bH"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="5"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Vca-pu-v34" customClass="LocalisedElementsButton" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="116.66666666666666" y="57" width="120" height="40"/>
<color key="backgroundColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="K1Z-vZ-Ips">
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="20"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</constraint>
<constraint firstAttribute="width" constant="120" id="iGd-tK-5dU"/>
</constraints>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="14"/>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="PLAY TRAILER"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="20"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="playTrailer:" destination="3jm-7v-5GP" eventType="touchUpInside" id="huT-re-Isv"/>
<action selector="playTrailerBtnTapped:" destination="Faj-VN-SMZ" eventType="touchUpInside" id="8cp-eS-VFj"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="MASILA" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xhN-tm-LoZ">
<rect key="frame" x="7" y="152" width="339" height="21.666666666666657"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
<color key="textColor" name="TextDarkBlue"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="Vca-pu-v34" firstAttribute="centerY" secondItem="l2T-ED-avg" secondAttribute="centerY" id="0Un-bt-NWE"/>
<constraint firstItem="l2T-ED-avg" firstAttribute="leading" secondItem="dj6-9c-mxm" secondAttribute="leading" constant="7" id="BET-Pu-J0t"/>
<constraint firstItem="l2T-ED-avg" firstAttribute="top" secondItem="dj6-9c-mxm" secondAttribute="top" constant="7" id="LYv-Tk-IDH"/>
<constraint firstItem="xhN-tm-LoZ" firstAttribute="leading" secondItem="dj6-9c-mxm" secondAttribute="leading" constant="7" id="TQZ-Ib-f6E"/>
<constraint firstAttribute="trailing" secondItem="l2T-ED-avg" secondAttribute="trailing" constant="7" id="Wbg-xe-81M"/>
<constraint firstItem="xhN-tm-LoZ" firstAttribute="top" secondItem="l2T-ED-avg" secondAttribute="bottom" constant="5" id="dR7-LV-1RK"/>
<constraint firstItem="Vca-pu-v34" firstAttribute="centerX" secondItem="l2T-ED-avg" secondAttribute="centerX" id="dYy-Bn-mA5"/>
<constraint firstAttribute="trailing" secondItem="xhN-tm-LoZ" secondAttribute="trailing" constant="7" id="nKE-s8-KX5"/>
<constraint firstAttribute="height" constant="180" id="q7z-Hq-SSj"/>
</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>
</subviews>
<edgeInsets key="layoutMargins" top="10" left="10" bottom="0.0" right="10"/>
</stackView>
@@ -1160,10 +1249,10 @@
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemBrownColor">
<color red="0.63529411764705879" green="0.51764705882352946" blue="0.36862745098039218" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.63529411759999999" green="0.51764705879999995" blue="0.36862745099999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemGreenColor">
<color red="0.20392156862745098" green="0.7803921568627451" blue="0.34901960784313724" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.20392156859999999" green="0.78039215689999997" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>

View File

@@ -18,6 +18,7 @@ class ThemeOneVC: UIViewController {
@IBOutlet weak var nameLabel: UILabel!
@IBOutlet weak var welcomeLabel: LocalisedElementsLabel!
@IBOutlet weak var HelloLabel: LocalisedElementsLabel!
@IBOutlet weak var liveTVIcon: UIView!
@IBOutlet weak var notificationBtnn: UIButton!
@IBOutlet weak var avatarImage: UIImageView!
@@ -45,7 +46,8 @@ class ThemeOneVC: UIViewController {
NotificationCenter.default.removeObserver(self, name: UIApplication.didEnterBackgroundNotification, object: nil)
NotificationCenter.default.removeObserver(self, name: UIApplication.willEnterForegroundNotification, object: nil)
NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: K.NotificationCenterReloads.reloadTheme), object: nil)
}
NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: K.NotificationCenterReloads.themeOnePush), object: nil)
}
override func viewDidLoad() {
super.viewDidLoad()
@@ -63,6 +65,7 @@ class ThemeOneVC: UIViewController {
override func viewDidAppear(_ animated: Bool) {
vm.shouldAnimate = true
K.GVar.topView = .theme1
vm.moveLiveTVView()
if let player = vm.avPlayer{
player.play()

View File

@@ -20,6 +20,7 @@ class ThemeTwoVC: UIViewController {
deinit{
NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: K.NotificationCenterReloads.reloadTheme), object: nil)
NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: K.NotificationCenterReloads.themeTwoPush), object: nil)
}
override func viewDidLoad() {
@@ -32,6 +33,10 @@ class ThemeTwoVC: UIViewController {
}
}
override func viewDidAppear(_ animated: Bool) {
K.GVar.topView = .theme2
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
vm.setData()
@@ -50,6 +55,11 @@ class ThemeTwoVC: UIViewController {
}
}
}
@IBAction func playTrailer(_ sender: LocalisedElementsButton) {
let item = JwPlayerItemCreate(url: APIEndPoints.StaticURLs.masilaUrl, poster: nil, titles: "Masila")
JWPlayerManager.shared.presentPlayer(from: self, playerItems: [item], contentType: .trailer)
}
}
// MARK: - CollectionView DataSource Delegate

View File

@@ -43,9 +43,23 @@ class ThemeOneVM{
private func handleNotificationCenter(){
NotificationCenter.default.addObserver(self, selector: #selector(appDidEnterBackground), name: UIApplication.didEnterBackgroundNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(appWillEnterForeground), name: UIApplication.willEnterForegroundNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(self.themeOnePush(notification:)), name: NSNotification.Name(rawValue: K.NotificationCenterReloads.themeOnePush), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(self.reloadTheme), name: NSNotification.Name(rawValue: K.NotificationCenterReloads.reloadTheme), object: nil)
}
@objc func themeOnePush(notification: Notification){
if let userInfo = notification.userInfo, let action = userInfo["action"] as? TopViewPush {
switch action {
case .webseries:
let sb = UIStoryboard(name: K.StoryBoard.webSeries, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.WebSeries.webSeriesVC) as! WebSeriesVC
vc.navigationController?.pushViewController(vcPush, animated: true)
case .liveTV:
handleTap(UITapGestureRecognizer())
}
}
}
func setupAvPlayer(){
// Ensure the liveStreamURL is valid
// guard let liveStreamURL = URL(string: self.liveStreamURL) else {
@@ -123,6 +137,7 @@ class ThemeOneVM{
func setUserData(){
guard let data = AuthFunc.shareInstance.userData else{return}
//set the first name as the name
/*
Check User Type,
Dont show username if the user type is guest
@@ -141,6 +156,7 @@ class ThemeOneVM{
default:
break
}
if let avatar = data.avtar{
//https://wokaland.com/admin/storage/app/public/uploads/avtar/avatar2.png?d=1716889852
vc.avatarImage.imageURL("https://wokaland.com/admin/storage/app/public/uploads/avtar/avatar2.png?d=1716889852")
@@ -192,12 +208,12 @@ class ThemeOneVM{
vc.gamesView.addTapGesture {
ViewButtonAnimation.sharedInstance.btnTapped(in: self.vc, view: self.vc.gamesView) { [weak self] in
guard let self else{return}
// let sb = UIStoryboard(name: K.StoryBoard.Games, bundle: nil)
// let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Games.gamesListVC) as! GamesListVC
// vc.navigationController?.pushViewController(vcPush, animated: true)
let sb = UIStoryboard(name: K.StoryBoard.cart, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Cart.cartListVC) as! CartListVC
self.vc.navigationController?.pushViewController(vcPush, animated: true)
let sb = UIStoryboard(name: K.StoryBoard.Games, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Games.gamesListVC) as! GamesListVC
vc.navigationController?.pushViewController(vcPush, animated: true)
// let sb = UIStoryboard(name: K.StoryBoard.cart, bundle: nil)
// let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Cart.cartListVC) as! CartListVC
// self.vc.navigationController?.pushViewController(vcPush, animated: true)
}
}
@@ -218,6 +234,13 @@ class ThemeOneVM{
vc.navigationController?.pushViewController(vcPush, animated: true)
}
}
vc.liveTVIcon.addTapGesture {
ViewButtonAnimation.sharedInstance.btnTapped(in: self.vc, view: self.vc.liveTVIcon) { [weak self] in
guard let self else{return}
handleTap(UITapGestureRecognizer())
}
}
}
// MARK: - Animate Clouds and LiveTV
@@ -289,6 +312,7 @@ class ThemeOneVM{
// function which is triggered when handleTap on livetv is called
@objc func handleTap(_ sender: UITapGestureRecognizer) {
DispatchQueue.main.async {
Utilities.startProgressHUD(msg: "Loading...")
}
@@ -327,6 +351,7 @@ class ThemeOneVM{
vc.contentType = .liveStream
vc.modalPresentationStyle = .fullScreen
vc.modalTransitionStyle = .crossDissolve
DispatchQueue.main.async { [weak self] in
guard let self else{return}
@@ -362,6 +387,7 @@ class ThemeOneVM{
func stopLiveStream(){
avPlayer.pause()
}
// MARK: - Handle Time Change
@objc func handleBackground(){

View File

@@ -44,8 +44,21 @@ class ThemeTwoVM{
NotificationCenter.default.addObserver(self, selector: #selector(self.reloadTheme), name: NSNotification.Name(rawValue: K.NotificationCenterReloads.reloadTheme), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(appDidEnterBackground), name: UIApplication.didEnterBackgroundNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(appWillEnterForeground), name: UIApplication.willEnterForegroundNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(self.viewPush(notification:)), name: NSNotification.Name(rawValue: K.NotificationCenterReloads.themeTwoPush), object: nil)
}
@objc func viewPush(notification: Notification){
if let userInfo = notification.userInfo, let action = userInfo["action"] as? TopViewPush {
switch action {
case .webseries:
let sb = UIStoryboard(name: K.StoryBoard.webSeries, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.WebSeries.webSeriesVC) as! WebSeriesVC
vc.navigationController?.pushViewController(vcPush, animated: true)
case .liveTV:
playLiveTV()
}
}
}
// MARK: - Notification Center Handlers
@objc func reloadTheme(){

View File

@@ -131,11 +131,11 @@ class JWPlayerManager {
playerVC.videoIndex = startIndex
playerVC.contentType = contentType
playerVC.config = finalConfig
playerVC.modalPresentationStyle = .fullScreen
playerVC.modalPresentationStyle = .overFullScreen
playerVC.modalTransitionStyle = .crossDissolve
// Present the PlayerVC
Utilities.dismissProgressHUD()
viewController.present(playerVC, animated: false) {
viewController.present(playerVC, animated: true) {
completion?()
// playerVC.transitionToFullScreen(animated: true) {
// print("FullScreen")