- added theme defaults on logout
- Added guest login from onboard - Added notification icon. Handled it with user journey
@@ -65,6 +65,7 @@
|
||||
5272FCE32BDFDB05000ECB1D /* UserDetailsRegisterVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5272FCE22BDFDB05000ECB1D /* UserDetailsRegisterVC.swift */; };
|
||||
5272FCE52BDFDC8C000ECB1D /* UserDetailsRegisterVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5272FCE42BDFDC8C000ECB1D /* UserDetailsRegisterVM.swift */; };
|
||||
529B0DD42C06156B00CFC54B /* LoginNavVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 529B0DD32C06156B00CFC54B /* LoginNavVC.swift */; };
|
||||
529B0DD62C070C0F00CFC54B /* GuestDataDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 529B0DD52C070C0F00CFC54B /* GuestDataDM.swift */; };
|
||||
52A3F6A52BECBA8D0000BB0B /* LinkedChildDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A3F6A42BECBA8D0000BB0B /* LinkedChildDM.swift */; };
|
||||
52A3F6A82BECBF2A0000BB0B /* LinkedChildCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A3F6A62BECBF2A0000BB0B /* LinkedChildCell.swift */; };
|
||||
52A3F6A92BECBF2A0000BB0B /* LinkedChildCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 52A3F6A72BECBF2A0000BB0B /* LinkedChildCell.xib */; };
|
||||
@@ -174,6 +175,8 @@
|
||||
26B5FF3DFDEFA683C1B79490 /* Pods-WOKA.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WOKA.debug.xcconfig"; path = "Target Support Files/Pods-WOKA/Pods-WOKA.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
5202AAFD2BDF90590043B7BD /* TextFieldImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextFieldImage.swift; sourceTree = "<group>"; };
|
||||
5202AB002BDFA7900043B7BD /* EmailValidation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmailValidation.swift; sourceTree = "<group>"; };
|
||||
520B6E3E2C0751E90091C478 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Theme.strings; sourceTree = "<group>"; };
|
||||
520B6E402C0751EF0091C478 /* hi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hi; path = hi.lproj/Theme.strings; sourceTree = "<group>"; };
|
||||
522242632BFC74380085C632 /* MyListVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MyListVC.swift; sourceTree = "<group>"; };
|
||||
522242652BFC74380085C632 /* TabBarVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TabBarVC.swift; sourceTree = "<group>"; };
|
||||
522242692BFC7AFC0085C632 /* SideMenuVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SideMenuVC.swift; sourceTree = "<group>"; };
|
||||
@@ -228,6 +231,7 @@
|
||||
5272FCE22BDFDB05000ECB1D /* UserDetailsRegisterVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDetailsRegisterVC.swift; sourceTree = "<group>"; };
|
||||
5272FCE42BDFDC8C000ECB1D /* UserDetailsRegisterVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDetailsRegisterVM.swift; sourceTree = "<group>"; };
|
||||
529B0DD32C06156B00CFC54B /* LoginNavVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginNavVC.swift; sourceTree = "<group>"; };
|
||||
529B0DD52C070C0F00CFC54B /* GuestDataDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuestDataDM.swift; sourceTree = "<group>"; };
|
||||
52A3F6A42BECBA8D0000BB0B /* LinkedChildDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkedChildDM.swift; sourceTree = "<group>"; };
|
||||
52A3F6A62BECBF2A0000BB0B /* LinkedChildCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkedChildCell.swift; sourceTree = "<group>"; };
|
||||
52A3F6A72BECBF2A0000BB0B /* LinkedChildCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LinkedChildCell.xib; sourceTree = "<group>"; };
|
||||
@@ -248,8 +252,6 @@
|
||||
52C1A4E02C05B69F007BAA50 /* UIApplicationSwitchRoot.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIApplicationSwitchRoot.swift; sourceTree = "<group>"; };
|
||||
52C1A4E42C05BC86007BAA50 /* MainNavController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainNavController.swift; sourceTree = "<group>"; };
|
||||
52C1A4E62C05C95D007BAA50 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Theme.storyboard; sourceTree = "<group>"; };
|
||||
52C1A4EF2C05DA49007BAA50 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Theme.strings; sourceTree = "<group>"; };
|
||||
52C1A4F12C05DA4C007BAA50 /* hi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hi; path = hi.lproj/Theme.strings; sourceTree = "<group>"; };
|
||||
52C6E0192BE383C000E22D59 /* YourIntrestCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YourIntrestCell.swift; sourceTree = "<group>"; };
|
||||
52C6E01A2BE383C000E22D59 /* YourIntrestCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = YourIntrestCell.xib; sourceTree = "<group>"; };
|
||||
52C6E01D2BE3847F00E22D59 /* BorderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BorderView.swift; sourceTree = "<group>"; };
|
||||
@@ -482,6 +484,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9C27E16A2BDB774D00EC1DA9 /* CarouselData.swift */,
|
||||
529B0DD52C070C0F00CFC54B /* GuestDataDM.swift */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
@@ -1131,6 +1134,7 @@
|
||||
5202AAFE2BDF90590043B7BD /* TextFieldImage.swift in Sources */,
|
||||
52FDDAB52BF34DC300E037C1 /* YesNoAlertVC.swift in Sources */,
|
||||
52C6E0232BE3B3E300E22D59 /* SelectAvatarVC.swift in Sources */,
|
||||
529B0DD62C070C0F00CFC54B /* GuestDataDM.swift in Sources */,
|
||||
5259545C2BEBB80400191286 /* AvatarDM.swift in Sources */,
|
||||
52C8B06C2BDA6E87003B51D0 /* LocalizedString.swift in Sources */,
|
||||
525953D42BE8B2DF00191286 /* UIApplication.swift in Sources */,
|
||||
@@ -1299,8 +1303,8 @@
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
52C1A4E62C05C95D007BAA50 /* Base */,
|
||||
52C1A4EF2C05DA49007BAA50 /* en */,
|
||||
52C1A4F12C05DA4C007BAA50 /* hi */,
|
||||
520B6E3E2C0751E90091C478 /* en */,
|
||||
520B6E402C0751EF0091C478 /* hi */,
|
||||
);
|
||||
name = Theme.storyboard;
|
||||
sourceTree = "<group>";
|
||||
|
||||
26
WOKA/Assets/Assets.xcassets/Home/Notification.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Notification.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "Notification@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "Notification@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "original"
|
||||
}
|
||||
}
|
||||
BIN
WOKA/Assets/Assets.xcassets/Home/Notification.imageset/Notification.png
vendored
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
WOKA/Assets/Assets.xcassets/Home/Notification.imageset/Notification@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
WOKA/Assets/Assets.xcassets/Home/Notification.imageset/Notification@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 55 KiB |
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "AudioBooks.png",
|
||||
"filename" : "Group 168.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "AudioBooks@2x.png",
|
||||
"filename" : "Group 168@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "AudioBooks@3x.png",
|
||||
"filename" : "Group 168@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
||||
BIN
WOKA/Assets/Assets.xcassets/Home/Theme2/AudioBooksT2.imageset/Group 168.png
vendored
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
WOKA/Assets/Assets.xcassets/Home/Theme2/AudioBooksT2.imageset/Group 168@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
WOKA/Assets/Assets.xcassets/Home/Theme2/AudioBooksT2.imageset/Group 168@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 100 KiB |
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "WebSeries.png",
|
||||
"filename" : "Group 165.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "WebSeries@2x.png",
|
||||
"filename" : "Group 165@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "WebSeries@3x.png",
|
||||
"filename" : "Group 165@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
||||
BIN
WOKA/Assets/Assets.xcassets/Home/Theme2/WebSeriesT2.imageset/Group 165.png
vendored
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
WOKA/Assets/Assets.xcassets/Home/Theme2/WebSeriesT2.imageset/Group 165@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 36 KiB |
@@ -14,11 +14,11 @@ struct UserDataDM: Codable {
|
||||
// MARK: - Result
|
||||
struct ResultData: Codable {
|
||||
let id: Int?
|
||||
let username, fullname: String?
|
||||
var username, fullname: String?
|
||||
// let gender: Gender?
|
||||
let birthdate, email: String?
|
||||
let avtar: String?
|
||||
let userType: String?
|
||||
var userType: String?
|
||||
let languageMasterID: Int?
|
||||
let lastLogin, rememberToken: String?
|
||||
let childDetail: ChildDetail?
|
||||
|
||||
@@ -101,9 +101,7 @@ class LoginVM{
|
||||
if user is not logined on other device directly nav him to home
|
||||
*/
|
||||
self.vc.toast(msg: data.message ?? K.ConstantString.unRecognised, time: 2) {
|
||||
UserDefaults.standard.set(true, forKey: K.UserDefaultsStruct.isUserLogined)
|
||||
UserDefaults.standard.set(dataResult.rememberToken, forKey: K.UserDefaultsStruct.userAccessToken)
|
||||
UIApplication.setRootView(SideMenuController.instantiate(from: .Home))
|
||||
self.loginDefaults(data: dataResult)
|
||||
}
|
||||
}
|
||||
default:
|
||||
@@ -137,9 +135,9 @@ class LoginVM{
|
||||
self.vc.toast(msg: data.message ?? "Unrecognised error" , time: 2)
|
||||
case 1:
|
||||
Utilities.dismissProgressHUD()
|
||||
guard let dataResult = data.data?.result else{return}
|
||||
self.vc.toast(msg: data.message ?? "Unrecognised error" , time: 2) {
|
||||
UserDefaults.standard.set(true, forKey: K.UserDefaultsStruct.isUserLogined)
|
||||
UIApplication.setRootView(SideMenuController.instantiate(from: .Home))
|
||||
self.loginDefaults(data: dataResult)
|
||||
}
|
||||
default:
|
||||
break
|
||||
@@ -151,6 +149,13 @@ class LoginVM{
|
||||
}
|
||||
}
|
||||
|
||||
private func loginDefaults(data : UserDataDM.ResultData){
|
||||
AuthFunc.shareInstance.userData = data
|
||||
UserDefaults.standard.set(true, forKey: K.UserDefaultsStruct.isUserLogined)
|
||||
UserDefaults.standard.set(data.rememberToken, forKey: K.UserDefaultsStruct.userAccessToken)
|
||||
UIApplication.setRootView(SideMenuController.instantiate(from: .Home))
|
||||
}
|
||||
|
||||
/*
|
||||
Guest Login
|
||||
*/
|
||||
|
||||
@@ -122,7 +122,7 @@ class OnBoardVM{
|
||||
"Accept-Language" : AuthFunc.shareInstance.languageSelected == .english ? "English" : "Hindi"]
|
||||
|
||||
Utilities.startProgressHUD()
|
||||
NetworkManager.shareInstance.apiRequest(url: APIEndPoints.Auth.guest_login, method: .post ,parameters: params, headers: header) {(result : Result<BaseResponseModel<UserDataDM>, NetworkManager.APIError>) in
|
||||
NetworkManager.shareInstance.apiRequest(url: APIEndPoints.Auth.guest_login, method: .post ,parameters: params, headers: header) {(result : Result<BaseResponseModel<GuestDataDM>, NetworkManager.APIError>) in
|
||||
switch result{
|
||||
case .success(let data):
|
||||
switch data.success{
|
||||
@@ -131,7 +131,11 @@ class OnBoardVM{
|
||||
self.vc.toast(msg: data.message ?? "Unrecognised error" , time: 2)
|
||||
case 1:
|
||||
Utilities.dismissProgressHUD()
|
||||
self.vc.toast(msg: data.message ?? "Unrecognised error" , time: 2)
|
||||
guard let dataUser = data.data else{return}
|
||||
AuthFunc.shareInstance.userData = UserDataDM.ResultData(id: nil, username: dataUser.username, fullname: dataUser.fullname, birthdate: nil, email: nil, avtar: nil, userType: "3", languageMasterID: nil, lastLogin: nil, rememberToken: nil, childDetail: nil, language: nil, alreadyLoggedIn: nil)
|
||||
self.vc.toast(msg: data.message ?? "Unrecognised error" , time: 2) {
|
||||
UIApplication.setRootView(SideMenuController.instantiate(from: .Home))
|
||||
}
|
||||
default:
|
||||
break
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ extension K{
|
||||
static let themeDefault = "themeDefault"
|
||||
static let isUserLogined = "isUserLogined"
|
||||
static let userAccessToken = "userAccessToken"
|
||||
static let defaultLanguage = "defaultLanguage"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<rect key="frame" x="79" y="48" width="335" height="814"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="30" translatesAutoresizingMaskIntoConstraints="NO" id="t37-ec-QfF">
|
||||
<rect key="frame" x="0.0" y="20" width="335" height="974"/>
|
||||
<rect key="frame" x="0.0" y="20" width="335" height="1026"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Xny-eg-3V4">
|
||||
<rect key="frame" x="25" y="0.0" width="295" height="30"/>
|
||||
@@ -318,47 +318,54 @@
|
||||
</subviews>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="NlR-Il-Kw6">
|
||||
<rect key="frame" x="25" y="604" width="295" height="192"/>
|
||||
<rect key="frame" x="25" y="604" width="295" height="244"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="27K-dP-rLv">
|
||||
<rect key="frame" x="0.0" y="0.0" width="105" height="32"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="heavy" pointSize="16"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="108" height="34"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
|
||||
<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="About WOKA"/>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dMJ-DD-Y51">
|
||||
<rect key="frame" x="0.0" y="40" width="42" height="32"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="heavy" pointSize="16"/>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6cu-a4-KbY">
|
||||
<rect key="frame" x="0.0" y="42" width="43" height="34"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
|
||||
<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="FAQs"/>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ddH-0C-3Sq">
|
||||
<rect key="frame" x="0.0" y="80" width="121" height="32"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="heavy" pointSize="16"/>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="AQz-8j-kyq">
|
||||
<rect key="frame" x="0.0" y="84" width="126" height="34"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
|
||||
<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="WOKA Support"/>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RpR-2h-L0h">
|
||||
<rect key="frame" x="0.0" y="120" width="81" height="32"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="heavy" pointSize="16"/>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cF2-pJ-F1x">
|
||||
<rect key="frame" x="0.0" y="126" width="88" height="34"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
|
||||
<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="My Profile"/>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iGj-UB-KrW">
|
||||
<rect key="frame" x="0.0" y="160" width="149" height="32"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="heavy" pointSize="16"/>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ol4-co-NoI">
|
||||
<rect key="frame" x="0.0" y="168" width="153" height="34"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
|
||||
<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="Add Child Account"/>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QgY-e1-Fgb">
|
||||
<rect key="frame" x="0.0" y="210" width="167" height="34"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
|
||||
<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="DeActivate Account"/>
|
||||
</button>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="eEN-Gz-Lba">
|
||||
<rect key="frame" x="25" y="826" width="295" height="148"/>
|
||||
<rect key="frame" x="25" y="878" width="295" height="148"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kdd-R6-VSK">
|
||||
<rect key="frame" x="0.0" y="0.0" width="295" height="0.5"/>
|
||||
@@ -486,9 +493,15 @@
|
||||
<barButtonItem key="backBarButtonItem" title=" " id="Ro0-vL-itb"/>
|
||||
</navigationItem>
|
||||
<connections>
|
||||
<outlet property="aboutBtn" destination="27K-dP-rLv" id="kBm-r0-Bxg"/>
|
||||
<outlet property="addChildBtn" destination="27K-dP-rLv" id="2fq-6R-u5e"/>
|
||||
<outlet property="avatarImage" destination="9zy-xC-ddd" id="efq-RR-ZHd"/>
|
||||
<outlet property="deactivateBtn" destination="QgY-e1-Fgb" id="ZaU-v0-APM"/>
|
||||
<outlet property="faqBtn" destination="6cu-a4-KbY" id="6ac-ts-oiw"/>
|
||||
<outlet property="languageControl" destination="dR3-t9-4tw" id="3Jd-0j-YA7"/>
|
||||
<outlet property="logoutBtn" destination="mCq-h5-pMf" id="bkx-Ld-3gQ"/>
|
||||
<outlet property="profileBtn" destination="cF2-pJ-F1x" id="CjM-zm-ZGI"/>
|
||||
<outlet property="scrollView" destination="iqc-o5-ovk" id="w7g-8R-7Su"/>
|
||||
<outlet property="selectionMenuTrailingConstraint" destination="V31-3u-cFE" id="gJh-Kh-fu0"/>
|
||||
<outlet property="theme1" destination="eUd-z5-WmN" id="2jG-Ie-lWp"/>
|
||||
<outlet property="theme2" destination="HCH-H0-TUd" id="YU1-tv-J8j"/>
|
||||
@@ -497,6 +510,7 @@
|
||||
<outlet property="themeTwoView" destination="myZ-Rs-VkQ" id="vlW-X8-kOY"/>
|
||||
<outlet property="themetwoCheckMark" destination="fAz-cu-AAI" id="LKC-y3-weu"/>
|
||||
<outlet property="userName" destination="G0X-jh-qqG" id="WXZ-cp-qkE"/>
|
||||
<outlet property="wokaSupportBtn" destination="AQz-8j-kyq" id="hzI-Mh-xWt"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="WmS-PJ-wRh" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
|
||||
|
||||
@@ -29,3 +29,15 @@
|
||||
"अधिक" = "MORE";
|
||||
"थीम" = "THEME";
|
||||
"लॉग आउट" = "LOGOUT";
|
||||
|
||||
/*
|
||||
Theme 2
|
||||
*/
|
||||
"वोका एफएम" = "WOKA FM";
|
||||
"लाइव टीवी" = "LIVE TV";
|
||||
"वेब सीरीज" = "WEB SERIES";
|
||||
"खेल" = "GAMES";
|
||||
"ऑडियो पुस्तकें" = "AUDIO BOOKS";
|
||||
"कराओके" = "KARAOKE";
|
||||
"दुकान" = "SHOP";
|
||||
"वोका का अन्वेषण करें" = "Explore WOKA";
|
||||
|
||||
@@ -172,3 +172,15 @@
|
||||
<string name="live_tv">लाइव टीवी</string>
|
||||
<string name="welcome_to_wokaland">वोकलैंड में आपका स्वागत है</string>
|
||||
*/
|
||||
|
||||
/*
|
||||
Theme 2
|
||||
*/
|
||||
"WOKA FM" = "वोका एफएम";
|
||||
"LIVE TV" = "लाइव टीवी";
|
||||
"WEB SERIES" = "वेब सीरीज";
|
||||
"GAMES" = "खेल";
|
||||
"AUDIO BOOKS" = "ऑडियो पुस्तकें";
|
||||
"KARAOKE" = "कराओके";
|
||||
"SHOP" = "दुकान";
|
||||
"Explore WOKA" = "वोका का अन्वेषण करें";
|
||||
|
||||
@@ -9,6 +9,10 @@ import Foundation
|
||||
import AVFoundation
|
||||
import UIKit
|
||||
|
||||
enum GetSet{
|
||||
case get
|
||||
case set
|
||||
}
|
||||
class AuthFunc{
|
||||
|
||||
/**
|
||||
@@ -77,14 +81,35 @@ class AuthFunc{
|
||||
return accessToken ?? ""
|
||||
}
|
||||
|
||||
/*
|
||||
Get/Set the default language in Userdefaults
|
||||
*/
|
||||
func getSetDefaultLanguage(language : LocalizedEnum? ,getSet : GetSet) -> LocalizedEnum?{
|
||||
switch getSet{
|
||||
case .get:
|
||||
let accessToken = UserDefaults.standard.string(forKey: K.UserDefaultsStruct.defaultLanguage)
|
||||
if accessToken == LocalizedEnum.english.rawValue{
|
||||
return .english
|
||||
}else{
|
||||
return .hindi
|
||||
}
|
||||
case .set:
|
||||
guard let language else{return nil}
|
||||
AuthFunc.shareInstance.languageSelected = language
|
||||
UserDefaults.standard.setValue(language.rawValue, forKey: K.UserDefaultsStruct.userAccessToken)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
This func will remove the selected userdefaults while logout
|
||||
*/
|
||||
func logout(){
|
||||
//Reset Theme to defaults
|
||||
//Reset All to defaults
|
||||
UserDefaults.standard.setValue(nil, forKey: K.UserDefaultsStruct.themeDefault)
|
||||
UserDefaults.standard.setValue(nil, forKey: K.UserDefaultsStruct.isUserLogined)
|
||||
userData = nil
|
||||
selectedTheme = .theme1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
17
WOKA/OnBoarding Module/Model/GuestDataDM.swift
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// GuestDataDM.swift
|
||||
// WOKA
|
||||
//
|
||||
// Created by MacBook Pro on 29/05/24.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
struct GuestDataDM: Codable {
|
||||
var username: String?
|
||||
var fullname: String?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case username, fullname
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,11 @@ class SplashVM{
|
||||
vc.englishBtn.roundCorner()
|
||||
selectTheme()
|
||||
vc.activityIndicator.stopAnimating()
|
||||
|
||||
// check if user has selected the default language
|
||||
if let language = AuthFunc.shareInstance.getSetDefaultLanguage(language: nil, getSet: .get){
|
||||
AuthFunc.shareInstance.languageSelected = language
|
||||
}
|
||||
}
|
||||
|
||||
func selectTheme(){
|
||||
|
||||
@@ -23,7 +23,15 @@ class SideMenuVC: UIViewController {
|
||||
@IBOutlet weak var themetwoCheckMark: UIImageView!
|
||||
@IBOutlet weak var userName: UILabel!
|
||||
|
||||
@IBOutlet weak var aboutBtn: UIButton!
|
||||
@IBOutlet weak var faqBtn: UIButton!
|
||||
@IBOutlet weak var wokaSupportBtn: UIButton!
|
||||
@IBOutlet weak var profileBtn: UIButton!
|
||||
@IBOutlet weak var addChildBtn: UIButton!
|
||||
@IBOutlet weak var deactivateBtn: UIButton!
|
||||
|
||||
@IBOutlet weak var avatarImage: UIImageView!
|
||||
@IBOutlet weak var scrollView: UIScrollView!
|
||||
|
||||
var vm = SideMenuVM()
|
||||
|
||||
@@ -67,9 +75,9 @@ class SideMenuVC: UIViewController {
|
||||
Timer.scheduledTimer(withTimeInterval: 0.2, repeats: false) { _ in
|
||||
switch sender.selectedSegmentIndex{
|
||||
case 0: // English
|
||||
AuthFunc.shareInstance.languageSelected = .english
|
||||
_ = AuthFunc.shareInstance.getSetDefaultLanguage(language: .english, getSet: .set)
|
||||
case 1: // Hindi
|
||||
AuthFunc.shareInstance.languageSelected = .hindi
|
||||
_ = AuthFunc.shareInstance.getSetDefaultLanguage(language: .english, getSet: .set)
|
||||
default:
|
||||
break
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class TabBarVC: UITabBarController {
|
||||
self.setupTabBarUI()
|
||||
self.addCustomTabBarView()
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(languageDidChange), name: .languageDidChange, object: nil)
|
||||
|
||||
customizeTabBarItemIconSize()
|
||||
}
|
||||
|
||||
deinit{
|
||||
@@ -66,7 +66,7 @@ class TabBarVC: UITabBarController {
|
||||
// function to set tab bar item font
|
||||
func customizeTabBarItemFont() {
|
||||
// Set the font attributes
|
||||
let attributes = [NSAttributedString.Key.font: FontCustom.shareInstance.customFont(fontName: .Exo2_Bold, size: 12)]
|
||||
let attributes = [NSAttributedString.Key.font: FontCustom.shareInstance.customFont(fontName: .Exo2_Bold, size: 13)]
|
||||
|
||||
// Apply the attributes to the appearance proxy of UITabBarItem
|
||||
UITabBarItem.appearance().setTitleTextAttributes(attributes, for: .normal)
|
||||
|
||||
@@ -12,11 +12,13 @@ class SideMenuVM{
|
||||
weak var vc : SideMenuVC!
|
||||
|
||||
func initView(){
|
||||
AuthFunc.shareInstance.getSetDefaultLanguage(language: nil, getSet: .get) == .english ? (vc.languageControl.selectedSegmentIndex = 0) : (vc.languageControl.selectedSegmentIndex = 1)
|
||||
|
||||
customizeSegmentControl()
|
||||
AuthFunc.shareInstance.languageSelected == .english ? (vc.languageControl.selectedSegmentIndex = 0) : (vc.languageControl.selectedSegmentIndex = 1)
|
||||
let color1 = #colorLiteral(red: 0.144693464, green: 0.1426281333, blue: 0.6686832905, alpha: 1)
|
||||
let color2 = #colorLiteral(red: 0.6901960784, green: 0.2745098039, blue: 0.7568627451, alpha: 1)
|
||||
vc.logoutBtn.applyGradient(colors: [color1, color2], startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0.8, y: 0))
|
||||
|
||||
vc.logoutBtn.applyGradient(colors: [color1, color2], startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0, y: 0.8))
|
||||
vc.logoutBtn.layer.cornerRadius = vc.logoutBtn.frame.height / 2
|
||||
|
||||
// Adding the trailing constriant to make the view appeared center when expanded
|
||||
@@ -52,18 +54,36 @@ class SideMenuVM{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
setData()
|
||||
}
|
||||
|
||||
func setData(){
|
||||
guard let data = AuthFunc.shareInstance.userData else{return}
|
||||
|
||||
/*
|
||||
Check User Type,
|
||||
Dont show username if the user type is guest
|
||||
*/
|
||||
switch data.userType{
|
||||
case "1": // child
|
||||
vc.addChildBtn.isHidden = true
|
||||
vc.userName.text = (data.fullname == nil || data.fullname == "") ? "User" : data.fullname
|
||||
case "2" : // adult
|
||||
vc.addChildBtn.isHidden = false
|
||||
vc.userName.text = (data.fullname == nil || data.fullname == "") ? "User" : data.fullname
|
||||
case "3": // Guest
|
||||
vc.userName.text = ""
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
|
||||
//set the first name as the name
|
||||
vc.userName.text = (data.fullname == nil || data.fullname == "") ? "User" : data.fullname
|
||||
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",color: .white)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func themeSelect(){
|
||||
@@ -94,6 +114,4 @@ class SideMenuVM{
|
||||
vc.languageControl.layer.masksToBounds = true
|
||||
vc.languageControl.clipsToBounds = true
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -79,8 +79,8 @@
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Boy" translatesAutoresizingMaskIntoConstraints="NO" id="o2x-QJ-V9A">
|
||||
<rect key="frame" x="62.666666666666657" y="0.0" width="49.666666666666657" height="47.666666666666664"/>
|
||||
</imageView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Pal-S1-L45">
|
||||
<rect key="frame" x="37.33333333333335" y="52.666666666666671" width="100.66666666666669" height="24"/>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" spacing="3" translatesAutoresizingMaskIntoConstraints="NO" id="Pal-S1-L45">
|
||||
<rect key="frame" x="35.666666666666664" y="52.666666666666671" width="103.66666666666669" height="24"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Hello" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YmK-3m-WeD" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="50.333333333333336" height="24"/>
|
||||
@@ -89,7 +89,7 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="User" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tQN-s8-9SK">
|
||||
<rect key="frame" x="50.333333333333314" y="0.0" width="50.333333333333343" height="24"/>
|
||||
<rect key="frame" x="53.333333333333343" y="0.0" width="50.333333333333343" height="24"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="20"/>
|
||||
<color key="textColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -171,20 +171,38 @@
|
||||
<constraint firstAttribute="trailing" secondItem="FTD-lO-6ko" secondAttribute="trailing" id="seE-xo-G4v"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="b3F-hf-9c8">
|
||||
<rect key="frame" x="338" y="69" width="40" height="40"/>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="Qfe-q3-rbY">
|
||||
<rect key="frame" x="348" y="64" width="40" height="40"/>
|
||||
<subviews>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="b3F-hf-9c8">
|
||||
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="OKf-qx-8Sn"/>
|
||||
<constraint firstAttribute="width" secondItem="b3F-hf-9c8" secondAttribute="height" multiplier="1:1" id="kMW-xB-hLg"/>
|
||||
</constraints>
|
||||
<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"/>
|
||||
</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"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="BZw-eT-gDG"/>
|
||||
<constraint firstAttribute="width" secondItem="twV-da-k4L" secondAttribute="height" multiplier="1:1" id="cI0-SX-Tnr"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="15"/>
|
||||
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="SideMenu"/>
|
||||
<connections>
|
||||
<action selector="barButtonTapped:" destination="VXi-XB-hOy" eventType="touchUpInside" id="q6K-lM-iS2"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="OKf-qx-8Sn"/>
|
||||
<constraint firstAttribute="width" secondItem="b3F-hf-9c8" secondAttribute="height" multiplier="1:1" id="kMW-xB-hLg"/>
|
||||
<constraint firstItem="twV-da-k4L" firstAttribute="width" secondItem="twV-da-k4L" secondAttribute="height" multiplier="1:1" id="VOj-ve-OKI"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="15"/>
|
||||
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="SideMenu"/>
|
||||
<connections>
|
||||
<action selector="barButtonTapped:" destination="VXi-XB-hOy" eventType="touchUpInside" id="wHk-vO-OlX"/>
|
||||
</connections>
|
||||
</button>
|
||||
</stackView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ppi-HI-rj1" userLabel="IconView">
|
||||
<rect key="frame" x="0.0" y="395.66666666666674" width="393" height="456.33333333333326"/>
|
||||
<subviews>
|
||||
@@ -361,8 +379,7 @@
|
||||
<constraint firstItem="xgH-t8-LiX" firstAttribute="trailing" secondItem="vdl-cu-G32" secondAttribute="trailing" id="55h-eD-07b"/>
|
||||
<constraint firstItem="jdZ-WQ-xcr" firstAttribute="leading" secondItem="vdl-cu-G32" secondAttribute="leading" id="5lp-Gk-fkY"/>
|
||||
<constraint firstItem="s5k-HV-Zkc" firstAttribute="leading" secondItem="rkf-MW-5IL" secondAttribute="trailing" constant="15" id="6G7-em-SiG"/>
|
||||
<constraint firstItem="b3F-hf-9c8" firstAttribute="top" secondItem="vdl-cu-G32" secondAttribute="top" constant="10" id="7lv-2v-Vmb"/>
|
||||
<constraint firstItem="vdl-cu-G32" firstAttribute="trailing" secondItem="b3F-hf-9c8" secondAttribute="trailing" constant="15" id="84K-nZ-Rfz"/>
|
||||
<constraint firstItem="Qfe-q3-rbY" firstAttribute="top" secondItem="vdl-cu-G32" secondAttribute="top" constant="5" id="6TP-Kg-skA"/>
|
||||
<constraint firstAttribute="bottom" secondItem="ppi-HI-rj1" secondAttribute="bottom" id="Ahn-Nf-O3r"/>
|
||||
<constraint firstItem="rkf-MW-5IL" firstAttribute="leading" secondItem="vdl-cu-G32" secondAttribute="leading" constant="10" id="B4I-l7-DMO"/>
|
||||
<constraint firstItem="xgH-t8-LiX" firstAttribute="top" secondItem="U1W-OZ-7vR" secondAttribute="bottom" constant="-10" id="CIy-vs-vwp"/>
|
||||
@@ -376,6 +393,7 @@
|
||||
<constraint firstItem="Jbf-Kl-35X" firstAttribute="top" secondItem="sf9-me-n7i" secondAttribute="bottom" constant="10" id="VLa-Ha-6Yo"/>
|
||||
<constraint firstItem="xgH-t8-LiX" firstAttribute="height" secondItem="UEh-jl-IQp" secondAttribute="height" multiplier="0.539906" id="YFN-fY-VOP"/>
|
||||
<constraint firstItem="rkf-MW-5IL" firstAttribute="centerY" secondItem="sf9-me-n7i" secondAttribute="centerY" constant="-20" id="ZVu-Px-dqT"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Qfe-q3-rbY" secondAttribute="trailing" constant="5" id="aJP-Fy-A7r"/>
|
||||
<constraint firstItem="xgH-t8-LiX" firstAttribute="leading" secondItem="vdl-cu-G32" secondAttribute="leading" id="axA-78-I8c"/>
|
||||
<constraint firstItem="jdZ-WQ-xcr" firstAttribute="height" secondItem="UEh-jl-IQp" secondAttribute="height" multiplier="0.625" id="dfh-6o-p0D"/>
|
||||
<constraint firstItem="LYo-Uy-0nM" firstAttribute="centerX" secondItem="vdl-cu-G32" secondAttribute="centerX" id="f0k-KL-GNO"/>
|
||||
@@ -402,6 +420,7 @@
|
||||
<outlet property="liveTvPlayer" destination="edI-4n-4AY" id="Ofv-d0-YP4"/>
|
||||
<outlet property="moonImage" destination="Jbf-Kl-35X" id="WBx-uu-r3W"/>
|
||||
<outlet property="nameLabel" destination="tQN-s8-9SK" id="GIQ-nv-8rM"/>
|
||||
<outlet property="notificationBtnn" destination="b3F-hf-9c8" id="elI-0K-6uE"/>
|
||||
<outlet property="webSeriesView" destination="Sp0-yh-bdj" id="HMn-cX-z6Y"/>
|
||||
<outlet property="welcomeLabel" destination="dnl-w0-q5K" id="ePX-F9-APX"/>
|
||||
<outletCollection property="star" destination="XTn-ID-1Yb" collectionClass="NSMutableArray" id="8Fh-RB-UOY"/>
|
||||
@@ -423,14 +442,14 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ksi-1c-xBG">
|
||||
<rect key="frame" x="0.0" y="132.33333333333334" width="393" height="220.00000000000003"/>
|
||||
<rect key="frame" x="0.0" y="134" width="393" height="220"/>
|
||||
<color key="backgroundColor" systemColor="systemGreenColor"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="220" id="ezY-uu-Vnb"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4qI-5q-8TH">
|
||||
<rect key="frame" x="338" y="68.333333333333329" width="40" height="40"/>
|
||||
<rect key="frame" x="338" y="69" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="4qI-5q-8TH" secondAttribute="height" multiplier="1:1" id="HP0-u8-WP8"/>
|
||||
<constraint firstAttribute="height" constant="40" id="pa1-no-jcD"/>
|
||||
@@ -445,22 +464,39 @@
|
||||
</connections>
|
||||
</button>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="wHk-XC-Cqq" userLabel="Avatar Stack">
|
||||
<rect key="frame" x="10" y="64" width="234.66666666666666" height="48.333333333333343"/>
|
||||
<rect key="frame" x="10" y="64" width="235" height="50"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Boy" translatesAutoresizingMaskIntoConstraints="NO" id="4xI-oX-ffb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="49.666666666666664" height="48.333333333333336"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="4xI-oX-ffb" secondAttribute="height" multiplier="1:1" id="D3h-in-fBe"/>
|
||||
<constraint firstAttribute="height" constant="50" id="YLL-Uk-qsp"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="LZa-k2-Fa1">
|
||||
<rect key="frame" x="59.666666666666686" y="0.0" width="175" height="48.333333333333336"/>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="LZa-k2-Fa1">
|
||||
<rect key="frame" x="60" y="0.0" width="175" height="50"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Hi, Vijay" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IFj-XX-sbq">
|
||||
<rect key="frame" x="0.0" y="0.0" width="175" 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>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" spacing="3" translatesAutoresizingMaskIntoConstraints="NO" id="Eb9-At-Mtt">
|
||||
<rect key="frame" x="0.0" y="0.0" width="103.66666666666667" height="25.666666666666668"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Hello" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IFj-XX-sbq" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="50.333333333333336" height="25.666666666666668"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<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>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="User" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qn2-Bb-Ud6">
|
||||
<rect key="frame" x="53.333333333333329" y="0.0" width="50.333333333333329" height="25.666666666666668"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<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>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Welcome to WOKALAND" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Nbe-Ob-bia" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="29" width="175" height="19.333333333333329"/>
|
||||
<rect key="frame" x="0.0" y="30.666666666666671" width="175" height="19.333333333333329"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="16"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -470,15 +506,15 @@
|
||||
</subviews>
|
||||
</stackView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="redraw" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="BottomFrame" translatesAutoresizingMaskIntoConstraints="NO" id="1fD-0F-KMn">
|
||||
<rect key="frame" x="0.0" y="457.33333333333326" width="393" height="464.66666666666674"/>
|
||||
<rect key="frame" x="0.0" y="459" width="393" height="463"/>
|
||||
</imageView>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wIw-DO-ba0">
|
||||
<rect key="frame" x="0.0" y="357.33333333333326" width="393" height="494.66666666666674"/>
|
||||
<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"/>
|
||||
<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">
|
||||
<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"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="20"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
@@ -534,8 +570,10 @@
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="avatarImage" destination="4xI-oX-ffb" id="CJN-fs-BUe"/>
|
||||
<outlet property="collectionView" destination="4rq-xX-XRh" id="Z66-JF-bp2"/>
|
||||
<outlet property="liveTvView" destination="Ksi-1c-xBG" id="xcg-na-dB1"/>
|
||||
<outlet property="nameLabel" destination="Qn2-Bb-Ud6" id="t3V-Kr-Tkh"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="AKa-H1-a6U" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
|
||||
@@ -559,6 +597,7 @@
|
||||
<image name="LiveTVBaloon" width="135" height="135"/>
|
||||
<image name="LiveTVBorder" width="79.333335876464844" height="67"/>
|
||||
<image name="Moon" width="144.66667175292969" height="144.66667175292969"/>
|
||||
<image name="Notification" width="44" height="44"/>
|
||||
<image name="Shop" width="165.33332824707031" height="148"/>
|
||||
<image name="SideMenu" width="44" height="44"/>
|
||||
<image name="Star" width="62.666667938232422" height="62.666667938232422"/>
|
||||
|
||||
@@ -19,6 +19,7 @@ class ThemeOneVC: UIViewController {
|
||||
@IBOutlet weak var welcomeLabel: LocalisedElementsLabel!
|
||||
@IBOutlet weak var HelloLabel: LocalisedElementsLabel!
|
||||
|
||||
@IBOutlet weak var notificationBtnn: UIButton!
|
||||
@IBOutlet weak var avatarImage: UIImageView!
|
||||
|
||||
@IBOutlet weak var webSeriesView: UIStackView!
|
||||
@@ -37,9 +38,7 @@ 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)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
@@ -12,6 +12,8 @@ class ThemeTwoVC: UIViewController {
|
||||
weak var delegate: ChildViewControllerDelegate?
|
||||
@IBOutlet weak var collectionView: UICollectionView!
|
||||
@IBOutlet weak var liveTvView: UIView!
|
||||
@IBOutlet weak var nameLabel: UILabel!
|
||||
@IBOutlet weak var avatarImage: UIImageView!
|
||||
|
||||
var vm = ThemeTwoVM()
|
||||
|
||||
@@ -44,7 +46,7 @@ extension ThemeTwoVC : CollectionViewSRC{
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: K.CellIdentifier.Theme.homeExploreCell, for: indexPath) as! HomeExploreCell
|
||||
cell.setData(image: vm.cellData[indexPath.row])
|
||||
cell.setData(data : vm.cellData[indexPath.row])
|
||||
return cell
|
||||
}
|
||||
|
||||
|
||||
@@ -10,12 +10,21 @@ import UIKit
|
||||
class HomeExploreCell: UICollectionViewCell {
|
||||
|
||||
@IBOutlet weak var cellBtn: UIImageView!
|
||||
@IBOutlet weak var cellLabel: LocalisedElementsLabel!
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
// Initialization code
|
||||
self.addTapGesture {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
func setData(image : String){
|
||||
self.cellBtn.image = UIImage(named: image)
|
||||
func btnTap(){
|
||||
|
||||
}
|
||||
|
||||
func setData(data : Theme2Struct){
|
||||
self.cellBtn.image = UIImage(named: data.imageName)
|
||||
self.cellLabel.text = data.text.localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
<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"/>
|
||||
@@ -17,21 +22,45 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="145" height="145"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="WokaFMT2" translatesAutoresizingMaskIntoConstraints="NO" id="SFy-o2-AXG">
|
||||
<rect key="frame" x="5" y="5" width="135" height="135"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="88P-F5-D0L">
|
||||
<rect key="frame" x="0.0" y="0.0" width="145" height="145"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="WokaFMT2" translatesAutoresizingMaskIntoConstraints="NO" id="SFy-o2-AXG">
|
||||
<rect key="frame" x="5" y="5" width="135" height="135"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="arf-zP-3pw" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="54.333333333333329" y="108" width="36.333333333333329" height="17"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="17" id="rMH-gp-mzc"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="14"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="SFy-o2-AXG" secondAttribute="bottom" constant="5" id="Ch3-iM-WDt"/>
|
||||
<constraint firstItem="arf-zP-3pw" firstAttribute="centerX" secondItem="88P-F5-D0L" secondAttribute="centerX" id="Krp-Mc-0fZ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="arf-zP-3pw" secondAttribute="bottom" constant="20" id="RKj-hf-cWj"/>
|
||||
<constraint firstAttribute="trailing" secondItem="SFy-o2-AXG" secondAttribute="trailing" constant="5" id="aog-eb-Pp0"/>
|
||||
<constraint firstItem="SFy-o2-AXG" firstAttribute="top" secondItem="88P-F5-D0L" secondAttribute="top" constant="5" id="dt1-fx-tRT"/>
|
||||
<constraint firstItem="SFy-o2-AXG" firstAttribute="leading" secondItem="88P-F5-D0L" secondAttribute="leading" constant="5" id="tQv-mN-Jo1"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
</view>
|
||||
<viewLayoutGuide key="safeArea" id="ZTg-uK-7eu"/>
|
||||
<constraints>
|
||||
<constraint firstItem="SFy-o2-AXG" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="5" id="Ogd-AO-BNT"/>
|
||||
<constraint firstItem="SFy-o2-AXG" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="5" id="VKa-Pp-78L"/>
|
||||
<constraint firstAttribute="bottom" secondItem="SFy-o2-AXG" secondAttribute="bottom" constant="5" id="iPy-xi-0TV"/>
|
||||
<constraint firstAttribute="trailing" secondItem="SFy-o2-AXG" secondAttribute="trailing" constant="5" id="oqe-nc-acg"/>
|
||||
<constraint firstAttribute="bottom" secondItem="88P-F5-D0L" secondAttribute="bottom" id="EjB-Iw-U4i"/>
|
||||
<constraint firstItem="88P-F5-D0L" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="iC8-ka-H25"/>
|
||||
<constraint firstAttribute="trailing" secondItem="88P-F5-D0L" secondAttribute="trailing" id="lhb-uS-asa"/>
|
||||
<constraint firstItem="88P-F5-D0L" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="uUX-L0-jCS"/>
|
||||
</constraints>
|
||||
<size key="customSize" width="145" height="145"/>
|
||||
<connections>
|
||||
<outlet property="cellBtn" destination="SFy-o2-AXG" id="nEY-rV-xHM"/>
|
||||
<outlet property="cellLabel" destination="arf-zP-3pw" id="oGY-wx-NJa"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="199.23664122137404" y="22.183098591549296"/>
|
||||
</collectionViewCell>
|
||||
|
||||
@@ -33,7 +33,24 @@ class ThemeOneVM{
|
||||
func setData(){
|
||||
guard let data = AuthFunc.shareInstance.userData else{return}
|
||||
//set the first name as the name
|
||||
vc.nameLabel.text = data.fullname?.components(separatedBy: " ").first
|
||||
/*
|
||||
Check User Type,
|
||||
Dont show username if the user type is guest
|
||||
*/
|
||||
switch data.userType{
|
||||
case "1": // child
|
||||
vc.nameLabel.text = data.fullname?.components(separatedBy: " ").first
|
||||
vc.notificationBtnn.isHidden = false
|
||||
case "2" : // adult
|
||||
vc.nameLabel.text = data.fullname?.components(separatedBy: " ").first
|
||||
vc.notificationBtnn.isHidden = false
|
||||
case "3": // Guest
|
||||
vc.nameLabel.text = ""
|
||||
vc.notificationBtnn.isHidden = true
|
||||
break
|
||||
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/" + avatar)
|
||||
|
||||
@@ -7,17 +7,55 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
struct Theme2Struct{
|
||||
let imageName : String
|
||||
let text : String
|
||||
}
|
||||
class ThemeTwoVM{
|
||||
|
||||
weak var vc : ThemeTwoVC!
|
||||
|
||||
var cellData = ["WokaFMT2", "LiveTVT2", "WebSeriesT2", "GamesT2", "AudioBooksT2", "KaraokeT2", "ShopT2"]
|
||||
// var cellData = ["WokaFMT2", "LiveTVT2", "WebSeriesT2", "GamesT2", "AudioBooksT2", "KaraokeT2", "ShopT2"]
|
||||
var cellData = [Theme2Struct(imageName: "WokaFMT2", text: "WOKA FM"),
|
||||
Theme2Struct(imageName: "LiveTVT2", text: "LIVE TV"),
|
||||
Theme2Struct(imageName: "WebSeriesT2", text: "WEB SERIES"),
|
||||
Theme2Struct(imageName: "GamesT2", text: "GAMES"),
|
||||
Theme2Struct(imageName: "AudioBooksT2", text: "AUDIO BOOKS"),
|
||||
Theme2Struct(imageName: "KaraokeT2", text: "KARAOKE"),
|
||||
Theme2Struct(imageName: "ShopT2", text: "SHOP")]
|
||||
|
||||
func initView(){
|
||||
setupCell()
|
||||
setData()
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(self.reloadTheme), name: NSNotification.Name(rawValue: K.NotificationCenterReloads.reloadTheme), object: nil)
|
||||
}
|
||||
|
||||
func setData(){
|
||||
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
|
||||
*/
|
||||
switch data.userType{
|
||||
case "1": // child
|
||||
vc.nameLabel.text = data.fullname?.components(separatedBy: " ").first
|
||||
case "2" : // adult
|
||||
vc.nameLabel.text = data.fullname?.components(separatedBy: " ").first
|
||||
case "3": // Guest
|
||||
vc.nameLabel.text = ""
|
||||
break
|
||||
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/" + avatar)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: - Notification Center Handlers
|
||||
|
||||
@objc func reloadTheme(){
|
||||
|
||||
@@ -5,12 +5,15 @@
|
||||
/* Class = "UILabel"; text = "MORE"; ObjectID = "4pq-lE-hJz"; */
|
||||
"4pq-lE-hJz.text" = "MORE";
|
||||
|
||||
/* Class = "UILabel"; text = "Hi, Vijay"; ObjectID = "IFj-XX-sbq"; */
|
||||
"IFj-XX-sbq.text" = "Hi, Vijay";
|
||||
/* Class = "UILabel"; text = "Hello"; ObjectID = "IFj-XX-sbq"; */
|
||||
"IFj-XX-sbq.text" = "Hello";
|
||||
|
||||
/* Class = "UILabel"; text = "Welcome to WOKALAND"; ObjectID = "Nbe-Ob-bia"; */
|
||||
"Nbe-Ob-bia.text" = "Welcome to WOKALAND";
|
||||
|
||||
/* Class = "UILabel"; text = "Hello"; ObjectID = "Qn2-Bb-Ud6"; */
|
||||
"Qn2-Bb-Ud6.text" = "Hello";
|
||||
|
||||
/* Class = "UILabel"; text = "AUDIO BOOKS"; ObjectID = "Y9F-E4-lgm"; */
|
||||
"Y9F-E4-lgm.text" = "AUDIO BOOKS";
|
||||
|
||||
|
||||
@@ -5,12 +5,15 @@
|
||||
/* Class = "UILabel"; text = "MORE"; ObjectID = "4pq-lE-hJz"; */
|
||||
"4pq-lE-hJz.text" = "MORE";
|
||||
|
||||
/* Class = "UILabel"; text = "Hi, Vijay"; ObjectID = "IFj-XX-sbq"; */
|
||||
"IFj-XX-sbq.text" = "Hi, Vijay";
|
||||
/* Class = "UILabel"; text = "Hello"; ObjectID = "IFj-XX-sbq"; */
|
||||
"IFj-XX-sbq.text" = "Hello";
|
||||
|
||||
/* Class = "UILabel"; text = "Welcome to WOKALAND"; ObjectID = "Nbe-Ob-bia"; */
|
||||
"Nbe-Ob-bia.text" = "Welcome to WOKALAND";
|
||||
|
||||
/* Class = "UILabel"; text = "Hello"; ObjectID = "Qn2-Bb-Ud6"; */
|
||||
"Qn2-Bb-Ud6.text" = "Hello";
|
||||
|
||||
/* Class = "UILabel"; text = "AUDIO BOOKS"; ObjectID = "Y9F-E4-lgm"; */
|
||||
"Y9F-E4-lgm.text" = "AUDIO BOOKS";
|
||||
|
||||
|
||||