- fixed home name label content hugging issue

- added edit btn to full name
- Linked the add child to the userregisteration details
- Added Hindi Lingual file to profile view
- Made the custom alert for deactivate account
- updated the username check logic
- Added logout api and handled the user logout
- Handled the logout when device change globally
This commit is contained in:
Bilal
2024-06-06 20:19:22 +05:30
parent 334dc39dda
commit 5fdd255130
32 changed files with 295 additions and 52 deletions

View File

@@ -159,6 +159,7 @@
9C9BEEC72BEE1BBF004ECC2F /* CollectionViewCenteredFlowLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C9BEEC62BEE1BBF004ECC2F /* CollectionViewCenteredFlowLayout.swift */; };
9CA7C6C02C1093E500D73742 /* ProfileVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CA7C6BF2C1093E500D73742 /* ProfileVC.swift */; };
9CA7C6C22C1095B600D73742 /* ProfileVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CA7C6C12C1095B600D73742 /* ProfileVM.swift */; };
9CB4C5A92C118EF300737C00 /* NavBarColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CB4C5A82C118EF300737C00 /* NavBarColor.swift */; };
9CBCB29B2BE4D614007D7934 /* LoginVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CBCB29A2BE4D614007D7934 /* LoginVC.swift */; };
9CBCB29D2BE4D6BB007D7934 /* LoginVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CBCB29C2BE4D6BB007D7934 /* LoginVM.swift */; };
9CBCB29F2BE4E13A007D7934 /* ValidatorClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CBCB29E2BE4E13A007D7934 /* ValidatorClass.swift */; };
@@ -356,6 +357,7 @@
9C9BEEC62BEE1BBF004ECC2F /* CollectionViewCenteredFlowLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionViewCenteredFlowLayout.swift; sourceTree = "<group>"; };
9CA7C6BF2C1093E500D73742 /* ProfileVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileVC.swift; sourceTree = "<group>"; };
9CA7C6C12C1095B600D73742 /* ProfileVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileVM.swift; sourceTree = "<group>"; };
9CB4C5A82C118EF300737C00 /* NavBarColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavBarColor.swift; sourceTree = "<group>"; };
9CBCB29A2BE4D614007D7934 /* LoginVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginVC.swift; sourceTree = "<group>"; };
9CBCB29C2BE4D6BB007D7934 /* LoginVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginVM.swift; sourceTree = "<group>"; };
9CBCB29E2BE4E13A007D7934 /* ValidatorClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ValidatorClass.swift; sourceTree = "<group>"; };
@@ -784,6 +786,7 @@
52A3F6AC2BECC0340000BB0B /* TypeAlias.swift */,
5219C2C12C086D9B00A1DF4D /* DataTypeConversion.swift */,
9C7939142C0F23AA00F5D6E6 /* NsNotificationExtension.swift */,
9CB4C5A82C118EF300737C00 /* NavBarColor.swift */,
);
path = Helpers;
sourceTree = "<group>";
@@ -1385,6 +1388,7 @@
9C27E1652BDB6FBC00EC1DA9 /* StoryBoardID.swift in Sources */,
52FDBA782BFF23F4009D7AC7 /* TimePeriod.swift in Sources */,
522A931C2C0DE9150098FE49 /* AboutUsVc.swift in Sources */,
9CB4C5A92C118EF300737C00 /* NavBarColor.swift in Sources */,
525954322BEA39D200191286 /* AddTapGesture.swift in Sources */,
522242682BFC74380085C632 /* TabBarVC.swift in Sources */,
9C27E1722BDB86B600EC1DA9 /* OnBoardCell.swift in Sources */,

View File

@@ -69,7 +69,7 @@
<subviews>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8Rk-n4-dY5">
<rect key="frame" x="0.0" y="0.0" width="333" height="50"/>
<color key="backgroundColor" name="TextDarkBlue"/>
<color key="backgroundColor" red="0.36862745099999999" green="0.1215686275" blue="0.76862745099999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" title="Ok, Got it.">
@@ -193,7 +193,7 @@
<subviews>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Mtd-2O-WKd" customClass="LocalisedElementsButton" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="141.66666666666666" height="50"/>
<color key="backgroundColor" name="TextDarkBlue"/>
<color key="backgroundColor" red="0.36862745098039218" green="0.12156862745098039" blue="0.76862745098039209" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" title="No">
@@ -205,7 +205,7 @@
</button>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FnX-50-KNX" customClass="LocalisedElementsButton" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="181.66666666666663" y="0.0" width="141.33333333333337" height="50"/>
<color key="backgroundColor" name="TextDarkBlue"/>
<color key="backgroundColor" red="0.36862745098039218" green="0.12156862745098039" blue="0.76862745098039209" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" title="Yes">
@@ -248,6 +248,7 @@
</view>
<connections>
<outlet property="content" destination="2hO-Cj-GYn" id="OjT-jJ-MJq"/>
<outlet property="mainTitle" destination="jJ7-vb-Tw5" id="mpq-BR-Bo4"/>
<outlet property="noBtn" destination="Mtd-2O-WKd" id="Ix4-wL-cBy"/>
<outlet property="yesBtn" destination="FnX-50-KNX" id="Gwm-fs-pkg"/>
</connections>

View File

@@ -17,6 +17,7 @@ class YesNoAlertVC: UIViewController {
@IBOutlet weak var yesBtn: UIButton!
@IBOutlet weak var noBtn: UIButton!
@IBOutlet weak var content: UILabel!
@IBOutlet weak var mainTitle: UILabel!
// Properties
var contentLabel = String()
@@ -31,14 +32,23 @@ class YesNoAlertVC: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
yesBtn.roundCorner()
noBtn.roundCorner()
updateUI()
}
func updateUI(){
self.content.text = contentLabel
//If the title is provided then set it
if let mainTitleText{
self.mainTitle.text = mainTitleText
}
if let yesBtnText{
self.yesBtn.setTitle(yesBtnText, for: .normal)
}
if let noBtnText{
self.yesBtn.setTitle(noBtnText, for: .normal)
}

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "pencil.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 687 B

View File

@@ -21,6 +21,7 @@ extension K{
static let enterParentsEmail = "Enter your parent's email"
static let selectUsername = "Enter a username"
static let enterName = "Enter your name"
static let enterChildName = "Enter your child name"
static let enterPassword = "Enter your password"
}

View File

@@ -507,7 +507,11 @@ Sent to Your Parents Email</string>
<outlet property="enterNameTF" destination="tgW-LH-XfR" id="4Vt-ub-4z2"/>
<outlet property="enterPasswordTF" destination="4gw-z0-s4a" id="0nn-80-Rli"/>
<outlet property="enterUserNameTF" destination="m50-FZ-yVO" id="dNR-QE-LZs"/>
<outlet property="nameTitleLabel" destination="eZm-zl-55m" id="xVL-61-28l"/>
<outlet property="nextBtn" destination="Kqz-rN-BEF" id="Lyc-Tb-K5U"/>
<outlet property="passTitleLabel" destination="Fev-AX-lcQ" id="Rmv-Rm-EKG"/>
<outlet property="userNameTitleLabel" destination="w7B-kJ-IgM" id="tGa-Sl-ARi"/>
<outlet property="viewTitleLabel" destination="3x2-kd-tL1" id="Nkb-9q-ssi"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Bow-7Q-7qp" sceneMemberID="firstResponder"/>
@@ -1434,40 +1438,40 @@ Sent to Your Parents Email</string>
<size key="intrinsicContentSize" width="8.5" height="23.5"/>
</designable>
<designable name="4gw-z0-s4a">
<size key="intrinsicContentSize" width="200.5" height="20"/>
<size key="intrinsicContentSize" width="150.5" height="20"/>
</designable>
<designable name="68c-1b-KSI">
<size key="intrinsicContentSize" width="201.5" height="21"/>
<size key="intrinsicContentSize" width="151.5" height="21"/>
</designable>
<designable name="81S-Fa-CiD">
<size key="intrinsicContentSize" width="8.5" height="23.5"/>
</designable>
<designable name="DSB-Ge-wNO">
<size key="intrinsicContentSize" width="169" height="21"/>
<size key="intrinsicContentSize" width="119" height="21"/>
</designable>
<designable name="Hcd-Mm-IxW">
<size key="intrinsicContentSize" width="8.5" height="23.5"/>
</designable>
<designable name="JRR-Bk-5UP">
<size key="intrinsicContentSize" width="218" height="20"/>
<size key="intrinsicContentSize" width="168" height="20"/>
</designable>
<designable name="MpT-bm-drv">
<size key="intrinsicContentSize" width="8.5" height="23.5"/>
</designable>
<designable name="Skx-Ig-91N">
<size key="intrinsicContentSize" width="199" height="20"/>
<size key="intrinsicContentSize" width="149" height="20"/>
</designable>
<designable name="iJE-dm-qal">
<size key="intrinsicContentSize" width="200.5" height="20"/>
<size key="intrinsicContentSize" width="150.5" height="20"/>
</designable>
<designable name="m50-FZ-yVO">
<size key="intrinsicContentSize" width="201.5" height="21"/>
<size key="intrinsicContentSize" width="151.5" height="21"/>
</designable>
<designable name="tgW-LH-XfR">
<size key="intrinsicContentSize" width="169.5" height="21"/>
<size key="intrinsicContentSize" width="119.5" height="21"/>
</designable>
<designable name="wy2-0C-rxG">
<size key="intrinsicContentSize" width="201.5" height="21"/>
<size key="intrinsicContentSize" width="151.5" height="21"/>
</designable>
</designables>
<resources>

View File

@@ -36,7 +36,7 @@ class SelectAvatarVC: UIViewController {
let sb = UIStoryboard(name: K.StoryBoard.customAlerts, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.CustomAlerts.alertCustomVC) as! AlertCustomVC
vcPush.contentLabel = K.ConstantString.intrest.localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
vcPush.contentLabel = K.ConstantString.avatar.localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
vcPush.mainTitleText = K.ConstantString.error.localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
// vcPush.onDoneBlock = { isDone in }
vcPush.modalPresentationStyle = .overCurrentContext

View File

@@ -15,6 +15,11 @@ class UserDetailsRegisterVC : UIViewController{
@IBOutlet weak var enterPasswordTF: TextFieldShadow!
@IBOutlet weak var dontSharePassLabel: LocalisedElementsLabel!
@IBOutlet weak var viewTitleLabel: LocalisedElementsLabel!
@IBOutlet weak var userNameTitleLabel: LocalisedElementsLabel!
@IBOutlet weak var nameTitleLabel: LocalisedElementsLabel!
@IBOutlet weak var passTitleLabel: LocalisedElementsLabel!
var vm = UserDetailsRegisterVM()
override func viewDidLoad() {
@@ -39,7 +44,7 @@ class UserDetailsRegisterVC : UIViewController{
guard let name = enterNameTF.text ,let userName = enterUserNameTF.text , let pass = enterPasswordTF.text else{return}
/*
Check for username
Check for username, minimum 3 letters required
*/
if userName.count < 3{
enterUserNameTF.rightView?.isHidden = false
@@ -86,6 +91,7 @@ class UserDetailsRegisterVC : UIViewController{
let sb = UIStoryboard(name: K.StoryBoard.authenticationSB, bundle: nil)
let vc = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Authentication.userIntrestVC) as! UserIntrestVC
vc.vm.createChildAccount = true
self.navigationController?.pushViewController(vc, animated: true)
}
}
@@ -104,7 +110,7 @@ extension UserDetailsRegisterVC : UITextFieldDelegate{
return ValidatorClass.sharedInstanec.limitCharacter(length: 50,textField, shouldChangeCharactersIn: range, replacementString: string)
case enterUserNameTF:
textField.hideError()
if !string.numberAndCharacterAndSpecialChar(){return false}
if !string.userName(){return false}
return ValidatorClass.sharedInstanec.limitCharacter(length: 16,textField, shouldChangeCharactersIn: range, replacementString: string)
case enterPasswordTF:
let currentString = (textField.text ?? "") as NSString

View File

@@ -84,7 +84,7 @@ class UserIntrestVC: UIViewController {
}
// Check for Intrest.
if AuthFunc.shareInstance.userType == .kid{
if AuthFunc.shareInstance.userType == .kid || vm.createChildAccount != nil{
if AuthFunc.shareInstance.regData.interest_topic_id == nil || AuthFunc.shareInstance.regData.interest_topic_id?.count == 0{
let sb = UIStoryboard(name: K.StoryBoard.customAlerts, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.CustomAlerts.alertCustomVC) as! AlertCustomVC

View File

@@ -13,6 +13,9 @@ class SelectAvatarVM{
weak var vc : SelectAvatarVC!
var avatarData = [AvatarDM.ResultRecords]()
// This will become true only if parent is adding child
var createChildAccount : Bool?
func initView(){
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)

View File

@@ -12,6 +12,9 @@ class UserDetailsRegisterVM{
weak var vc : UserDetailsRegisterVC!
// This will become true only if parent is adding child
var createChildAccount : Bool?
func initView(){
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)
@@ -34,7 +37,15 @@ class UserDetailsRegisterVM{
vc.enterUserNameTF.addRightButton(title: "", tintColor: UIColor.red, btnImage: UIImage(systemName: "exclamationmark.circle.fill"), target: self, action: #selector(errorUserName))
vc.enterUserNameTF.rightView?.isHidden = true
AuthFunc.shareInstance.userType == .adult ? (vc.dontSharePassLabel.isHidden = true) : (vc.dontSharePassLabel.isHidden = false)
if let createChildAccount{ // this is from the home screen when a parent can adda child
vc.dontSharePassLabel.isHidden = true
vc.viewTitleLabel.text = "Add Child Account".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
vc.userNameTitleLabel.text = "USERNAME".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
vc.nameTitleLabel.text = "CHILD NAME?".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
vc.passTitleLabel.text = "PASSWORD".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
}else{
AuthFunc.shareInstance.userType == .adult ? (vc.dontSharePassLabel.isHidden = true) : (vc.dontSharePassLabel.isHidden = false)
}
}
@objc func errorName(){
@@ -70,7 +81,7 @@ class UserDetailsRegisterVM{
let params: Parameters = [
"email": AuthFunc.shareInstance.regData.email!,
"username": vc.enterUserNameTF.text!,
"user_type": AuthFunc.shareInstance.userType == .adult ? "2" :"1"
"user_type": (createChildAccount != nil) ? "1" : (AuthFunc.shareInstance.userType == .adult ? "2" :"1")
]
let headers : HTTPHeaders = ["Accept-Language" : AuthFunc.shareInstance.languageSelected == .english ? "English" : "Hindi"]

View File

@@ -13,6 +13,9 @@ class UserIntrestVM{
weak var vc : UserIntrestVC!
var intrestTopics = [IntrestTopicDM.Result]()
// This will become true only if parent is adding child
var createChildAccount : Bool?
func initView(){
let loc = Locale(identifier: "hi")
self.vc.datePicker.locale = loc
@@ -57,7 +60,7 @@ class UserIntrestVM{
let tapGesture2 = UITapGestureRecognizer(target: self, action: #selector(girlBtnTapped))
vc.girlView.addGestureRecognizer(tapGesture2)
if AuthFunc.shareInstance.userType == .adult{
if AuthFunc.shareInstance.userType == .adult && createChildAccount == nil{
/*
If user type is adult then no need to show intrest
*/

View File

@@ -67,7 +67,7 @@ class Utilities{
onCompletion(true)
})
let messageAttributes = [NSAttributedString.Key.font: UIFont(name: "Nunito-Regular", size: 18)!, NSAttributedString.Key.foregroundColor: UIColor.black]
let messageAttributes = [NSAttributedString.Key.font: FontCustom.shareInstance.customFont(fontName: .Exo2_Medium, size: 15), NSAttributedString.Key.foregroundColor: UIColor.black]
let messageString = NSAttributedString(string: msgBody, attributes: messageAttributes)
okAction.setValue(UIColor.appColor(.TextDarkBlue), forKey: "titleTextColor")

View File

@@ -0,0 +1,21 @@
//
// NavBarColor.swift
// WOKA
//
// Created by Bilal on 06/06/2024.
//
import UIKit
extension UINavigationController{
func setColor(color : UIColor){
// Set the navigation bar tint color
self.navigationBar.tintColor = color // Change to your desired color
// Set the navigation bar title text color
self.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: color,
NSAttributedString.Key.font : FontCustom.shareInstance.customFont(fontName: .Exo2_Bold, size: 20)]
}
}

View File

@@ -76,4 +76,15 @@ extension String{
return true
}
}
func userName()->Bool{
let allowedCharacters = CharacterSet(charactersIn: "abcdefghijklmnopqrstuvwxyz0123456789-_").inverted
let components = string.components(separatedBy: allowedCharacters)
let filtered = components.joined(separator: "")
if string != filtered {
return false
}else{
return true
}
}
}

View File

@@ -54,7 +54,7 @@
<autoresizingMask key="autoresizingMask"/>
<color key="tintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<textAttributes key="titleTextAttributes">
<fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue" pointSize="20"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="20"/>
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</textAttributes>
</navigationBar>
@@ -150,7 +150,7 @@
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="User" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="G0X-jh-qqG">
<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="G0X-jh-qqG">
<rect key="frame" x="49" y="0.0" width="39" height="22"/>
<fontDescription key="fontDescription" name="Exo2-SemiBold" family="Exo 2" pointSize="18"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -374,6 +374,9 @@
<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 Orders"/>
<connections>
<action selector="btnTapped:" destination="yYJ-KT-PYn" eventType="touchUpInside" id="MSe-ld-aKH"/>
</connections>
</button>
<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="210" width="153" height="34"/>
@@ -381,6 +384,9 @@
<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"/>
<connections>
<action selector="btnTapped:" destination="yYJ-KT-PYn" eventType="touchUpInside" id="VIu-D4-ZWe"/>
</connections>
</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="252" width="167" height="34"/>
@@ -388,6 +394,9 @@
<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"/>
<connections>
<action selector="btnTapped:" destination="yYJ-KT-PYn" eventType="touchUpInside" id="Zow-FC-4d4"/>
</connections>
</button>
</subviews>
</stackView>
@@ -940,10 +949,10 @@
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemCyanColor">
<color red="0.19607843137254902" green="0.67843137254901964" blue="0.90196078431372551" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.1960784314" green="0.67843137249999996" blue="0.90196078430000004" 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

@@ -125,7 +125,10 @@
"WHEN ARE YOUR INTRESTS?" = "तुम्हारी अभिरूचियाँ क्या है?";
"Select as many as you want" = "आप जितने चाहें उतने चुनें";
"Ok,Got it." = "ठीक है।";
"Add Child Account" = "चाइल्ड खाता जोड़ें";
"USERNAME" = "उपयोगकर्ता नाम";
"CHILD NAME?" = "बच्चे का नाम?";
"PASSWORD" = "पासवर्ड";
/*
Intrest VC
@@ -158,6 +161,15 @@
"THEME" = "थीम";
"LOGOUT" = "लॉग आउट";
/*
SideBar Nav
*/
"Profile" = "प्रोफ़ाइल";
"FULL NAME" = "पूरा नाम";
"EMAIL" = "ईमेल";
"Enter your child name" = "अपने बच्चे का नाम दर्ज करें";
/*
<string name="home">घर</string>
<string name="explore_woka">वोका का अन्वेषण करें</string>

View File

@@ -36,7 +36,9 @@ class AuthFunc{
var selectedTheme = ThemeSelect.theme1
//This is temporary variable. Make it emtpy when the registration is finished.
/*
This is temporary variable. Make it emtpy when the registration is finished.
*/
var regData = UserRegPostModel()
// Singleton instance of AuthFunc

View File

@@ -60,6 +60,7 @@ struct APIEndPoints {
static let user_queries_store = makeURL(path: "user_queries_store")
static let guest_queries_store = makeURL(path: "guest_queries_store")
static let update_profile = makeURL(path: "update_profile")
static let user_logout = makeURL(path: "user_logout")
}
// Other endpoint categories...

View File

@@ -8,9 +8,11 @@
import Foundation
// MARK: - BaseResponseModel
protocol ResponseProtocol {
var success: Int? { get }
}
class BaseResponseModel<T: Codable> : Codable {
//class BaseResponseModel: Codable {
class BaseResponseModel<T: Codable> : Codable, ResponseProtocol{
let success: Int?
let message: String?
let data: T?
@@ -21,3 +23,8 @@ class BaseResponseModel<T: Codable> : Codable {
case data
}
}
struct CommonResponseModel : Codable {
let sad : String?
}

View File

@@ -36,7 +36,7 @@ class NetworkManager{
/// - Parameter (header : HTTPHeaders , Params :[String : Any] , URL , Dedocable Generic T Struct. , queue : dispatchQueue decide)
/// - NOTE Oncompletion will be called on main thread so no need to specify the main thread for UI updates
/// - Returns: This function returns a GENERIC response base on the T Model & APIError .
func apiRequest<T: Codable>(
func apiRequest<T: Codable & ResponseProtocol>(
url: URLConvertible,
method: HTTPMethod,
parameters: Parameters? = nil,
@@ -57,6 +57,17 @@ class NetworkManager{
// alamofireLogger.request(response.da, didParseResponse: response)
switch response.result {
case .success(let value):
// Sucess = 4 menas user has logined in other device
if value.success == 4{
if let topController = UIApplication.topViewController() {
Utilities.alertWithBtnCompletion(title: "Session Expired", msgBody: "Please Login Again", okBtnStr: "OK", vc: topController) { isDone in
AuthFunc.shareInstance.logout()
// UIApplication.setRootView(MainNavController.instantiate(from: .Main))
UIApplication.setRootView(LoginNavVC.instantiate(from: .AuthenticationSB))
}
}
return
}
// Handle successful response on the main thread
DispatchQueue.main.async {
completionHandler(.success(value))
@@ -137,3 +148,22 @@ final class AlamofireLogger: EventMonitor {
NSLog("⚡️⚡️⚡️⚡️ Response All Headers: \(String(describing: response.response?.allHeaderFields))")
}
}
extension UIApplication {
class func topViewController(_ base: UIViewController? = UIApplication.shared.mainKeyWindow?.rootViewController) -> UIViewController? {
if let nav = base as? UINavigationController {
return topViewController(nav.visibleViewController)
}
if let tab = base as? UITabBarController {
if let selected = tab.selectedViewController {
return topViewController(selected)
}
}
if let presented = base?.presentedViewController {
return topViewController(presented)
}
return base
}
}

View File

@@ -24,6 +24,8 @@ class FaqVC: UIViewController {
navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
navigationController?.navigationBar.shadowImage = UIImage()
self.navigationController?.setColor(color: .white)
}
func setupCell(){
@@ -40,6 +42,8 @@ class FaqVC: UIViewController {
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
navigationController?.setNavigationBarHidden(true, animated: animated)
self.navigationController?.setColor(color: .black)
}
}

View File

@@ -24,7 +24,7 @@ class ProfileVC: UIViewController {
super.viewDidLoad()
vm.vc = self
vm.initView()
self.title = "Profile"
self.title = "Profile".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
navigationController?.navigationBar.shadowImage = UIImage()

View File

@@ -413,7 +413,7 @@
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="GK8-Ov-3Lf" userLabel="NAME">
<rect key="frame" x="20" y="151.5" width="374" height="99.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="FULL NAME" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dWX-YE-TV0">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="FULL NAME" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dWX-YE-TV0" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="374" height="19.5"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="16"/>
<color key="textColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="calibratedRGB"/>
@@ -449,7 +449,7 @@
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="mF6-Ik-pdq" userLabel="EMAIL">
<rect key="frame" x="20" y="286" width="374" height="99.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="EMAIL" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lss-KC-4LQ">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="EMAIL" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lss-KC-4LQ" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="374" height="19.5"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="16"/>
<color key="textColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="calibratedRGB"/>
@@ -503,7 +503,7 @@
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Boy" translatesAutoresizingMaskIntoConstraints="NO" id="bty-6i-uBA">
<rect key="frame" x="0.0" y="0.0" width="49.5" height="50"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="BOY" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="y4t-AQ-VlC">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="BOY" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="y4t-AQ-VlC" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="55" width="49.5" height="22"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
<color key="textColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="calibratedRGB"/>
@@ -527,7 +527,7 @@
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Girl" translatesAutoresizingMaskIntoConstraints="NO" id="m4x-et-VAb">
<rect key="frame" x="0.0" y="0.0" width="48.5" height="50"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="GIRL" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="225-qf-t1b">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="GIRL" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="225-qf-t1b" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="55" width="48.5" height="22"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
<color key="textColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="calibratedRGB"/>

View File

@@ -18,6 +18,8 @@ class ProfileVM{
vc.girlView.roundCorner(radius: 25)
vc.fullNameTF.roundCorner()
vc.emailTF.roundCorner()
vc.fullNameTF.addRightButton(title: nil, tintColor: UIColor.appColor(.TextDarkBlue)!, btnImage: UIImage(named: "EditPencilIcon"), target: self, action: #selector(editNameClicked))
vc.fullNameTF.delegate = self.vc
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)
@@ -25,7 +27,8 @@ class ProfileVM{
vc.nextBtn.roundCorner()
addTapGesture()
setUserData()
hindiEnglishLanguage()
/*
Depnding on user type limit the date
*/
@@ -40,6 +43,18 @@ class ProfileVM{
enableDisableNextBtn(enable: false)
}
func hindiEnglishLanguage(){
if AuthFunc.shareInstance.languageSelected == .hindi{
let loc = Locale(identifier: "hi")
self.vc.dob.locale = loc
}
vc.fullNameTF.placeholder = K.AuthenticationStringConstant.enterChildName.localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
}
@objc func editNameClicked(){
vc.fullNameTF.becomeFirstResponder()
}
func checkChanges(name : String?){
guard let data = AuthFunc.shareInstance.userData else{return}

View File

@@ -64,7 +64,12 @@ class SideMenuVC: UIViewController {
case profileBtn:
self.sideMenuController?.hideMenu()
NotificationCenter.default.post(name: .linkPush, object: nil, userInfo: ["type": LinkTypeEnum.profile])
case addChildBtn:
self.sideMenuController?.hideMenu()
NotificationCenter.default.post(name: .linkPush, object: nil, userInfo: ["type": LinkTypeEnum.addChild])
case deactivateBtn:
self.sideMenuController?.hideMenu()
NotificationCenter.default.post(name: .linkPush, object: nil, userInfo: ["type": LinkTypeEnum.deactivate])
default:
break
}
@@ -75,14 +80,17 @@ class SideMenuVC: UIViewController {
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.CustomAlerts.yesNoAlertVC) as! YesNoAlertVC
vcPush.mainTitleText = "WOKA"
vcPush.contentLabel = "Do you want to LOGOUT from the WOKA APP"
vcPush.onDoneBlock = { mode in
vcPush.onDoneBlock = { [weak self] mode in
guard let self else{return}
switch mode{
case .yes:
//If user clicked to proceed on login. Call the api.
self.sideMenuController?.hideMenu()
AuthFunc.shareInstance.logout()
// UIApplication.setRootView(MainNavController.instantiate(from: .Main))
UIApplication.setRootView(LoginNavVC.instantiate(from: .AuthenticationSB))
vm.logoutUser { isDone in
self.sideMenuController?.hideMenu()
AuthFunc.shareInstance.logout()
// UIApplication.setRootView(MainNavController.instantiate(from: .Main))
UIApplication.setRootView(LoginNavVC.instantiate(from: .AuthenticationSB))
}
case .no:
print("no")
}

View File

@@ -25,6 +25,9 @@ class TabBarVC: UITabBarController {
NotificationCenter.default.addObserver(self, selector: #selector(linkPush), name: .linkPush, object: nil)
customizeTabBarItemIconSize()
self.navigationController?.setColor(color: .black)
}
deinit{
@@ -52,8 +55,29 @@ class TabBarVC: UITabBarController {
let sb = UIStoryboard(name: K.StoryBoard.sideBarNav, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.SideBarNav.profileVC) as! ProfileVC
self.navigationController?.pushViewController(vcPush, animated: true)
default:
break
case .addChild:
let sb = UIStoryboard(name: K.StoryBoard.authenticationSB, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Authentication.userDetailsRegisterVC) as! UserDetailsRegisterVC
vcPush.vm.createChildAccount = true
AuthFunc.shareInstance.regData.email = AuthFunc.shareInstance.userData?.email
self.navigationController?.pushViewController(vcPush, animated: true)
case .deactivate:
let sb = UIStoryboard(name: K.StoryBoard.customAlerts, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.CustomAlerts.yesNoAlertVC) as! YesNoAlertVC
vcPush.mainTitleText = "Deactivate WOKA Account"
vcPush.contentLabel = "By clicking the button below, your account will be deactivated. Your data will be erased after one month."
vcPush.onDoneBlock = { mode in
switch mode{
case .yes:
//If user clicked to proceed on login. Call the api.
print("Yes")
case .no:
print("no")
}
}
vcPush.modalPresentationStyle = .overCurrentContext
vcPush.modalTransitionStyle = .crossDissolve
self.present(vcPush, animated: true)
}
}
}

View File

@@ -13,4 +13,5 @@ enum LinkTypeEnum {
case support
case profile
case addChild
case deactivate
}

View File

@@ -6,6 +6,7 @@
//
import UIKit
import Alamofire
class SideMenuVM{
@@ -133,4 +134,35 @@ class SideMenuVM{
vc.languageControl.layer.masksToBounds = true
vc.languageControl.clipsToBounds = true
}
// MARK: - Get Intrests
func logoutUser(onCompletion: @escaping (Bool) -> Void){
let headers : HTTPHeaders = ["Accept-Language" : AuthFunc.shareInstance.languageSelected == .english ? "English" : "Hindi",
"access-token": AuthFunc.shareInstance.getAccessToken()]
Utilities.startProgressHUD()
NetworkManager.shareInstance.apiRequest(url: APIEndPoints.SideBarNav.user_logout, method: .post, headers: headers) {(result : Result<BaseResponseModel<IntrestTopicDM>, NetworkManager.APIError>) in
switch result{
case .success(let data):
//0 -> Username already used. , 1-> Username available
switch data.success{
case 0:
Utilities.dismissProgressHUD()
self.vc.toast(msg: data.message ?? "Unrecognised error" , time: 2)
onCompletion(false)
case 1:
Utilities.dismissProgressHUD()
onCompletion(true)
default:
break
}
case .failure(let error):
Utilities.dismissProgressHUD()
self.vc.toast(msg: error.localizedDescription, time: 2)
onCompletion(false)
}
}
}
}

View File

@@ -79,18 +79,18 @@
<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" spacing="3" translatesAutoresizingMaskIntoConstraints="NO" id="Pal-S1-L45">
<rect key="frame" x="35.666666666666664" y="52.666666666666671" width="103.66666666666669" height="24"/>
<stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="JE2-1V-ByS">
<rect key="frame" x="37.666666666666664" y="52.666666666666671" width="99.666666666666686" height="24"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Hello" textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YmK-3m-WeD" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Hello" textAlignment="center" lineBreakMode="wordWrap" 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"/>
<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" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tQN-s8-9SK">
<rect key="frame" x="53.333333333333343" y="0.0" width="50.333333333333343" height="24"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="User" textAlignment="center" lineBreakMode="wordWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tQN-s8-9SK">
<rect key="frame" x="55.333333333333343" y="0.0" width="44.333333333333343" height="24"/>
<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" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="calibratedRGB"/>
@@ -98,7 +98,7 @@
</label>
</subviews>
</stackView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Welcome to WOKALAND" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dnl-w0-q5K" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Welcome to WOKALAND" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dnl-w0-q5K" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="81.666666666666657" width="175" height="19.333333333333329"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="16"/>
<color key="textColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="calibratedRGB"/>
@@ -593,7 +593,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="IIL-mJ-o64" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="3677" y="-1602"/>
<point key="canvasLocation" x="3599" y="-1602"/>
</scene>
</scenes>
<resources>

View File

@@ -27,6 +27,9 @@ class ThemeOneVM{
setUserData()
handleNotificationCenter()
addTapGestureToMovingView()
vc.nameLabel.setContentHuggingPriority(.fittingSizeLevel, for: .horizontal)
vc.nameLabel.setContentCompressionResistancePriority(.fittingSizeLevel, for: .horizontal)
}
private func handleNotificationCenter(){
@@ -82,7 +85,6 @@ class ThemeOneVM{
//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")
}
}
// MARK: - Notification Center Handlers