- Implemented UserQuery API with post and error handling with checks

- Implemented the logic for Guest Query.
- Added api for guest contact support
- Finalised the logic for the user guest and normal.
- Completed Profile UI
- Updated the profile from the getuserdata
- Added API for Profile update
This commit is contained in:
Bilal
2024-06-05 20:00:10 +05:30
parent 4175dca940
commit 334dc39dda
18 changed files with 1145 additions and 128 deletions

View File

@@ -130,6 +130,8 @@
9C0A853F2BEE35340093783D /* ForgotPassDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C0A853E2BEE35340093783D /* ForgotPassDM.swift */; };
9C0A85412BEE35670093783D /* ResetPassUserNameVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C0A85402BEE35670093783D /* ResetPassUserNameVM.swift */; };
9C0A85432BEE3EC90093783D /* NewPasswordVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C0A85422BEE3EC90093783D /* NewPasswordVM.swift */; };
9C1C69FA2C106B290035B2C7 /* RSKPlaceholderTextView in Frameworks */ = {isa = PBXBuildFile; productRef = 9C1C69F92C106B290035B2C7 /* RSKPlaceholderTextView */; };
9C1C69FC2C106C240035B2C7 /* ContactSupportVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C1C69FB2C106C240035B2C7 /* ContactSupportVM.swift */; };
9C27E1602BDB6ECA00EC1DA9 /* UserDefaultsStruct.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C27E15F2BDB6ECA00EC1DA9 /* UserDefaultsStruct.swift */; };
9C27E1632BDB6F1900EC1DA9 /* AuthFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C27E1622BDB6F1900EC1DA9 /* AuthFunc.swift */; };
9C27E1652BDB6FBC00EC1DA9 /* StoryBoardID.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C27E1642BDB6FBC00EC1DA9 /* StoryBoardID.swift */; };
@@ -155,6 +157,8 @@
9C7939172C0F23E900F5D6E6 /* LinkTypeEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C7939162C0F23E900F5D6E6 /* LinkTypeEnum.swift */; };
9C7939192C0F345000F5D6E6 /* ContactSupportVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C7939182C0F345000F5D6E6 /* ContactSupportVC.swift */; };
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 */; };
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 */; };
@@ -318,6 +322,7 @@
9C0A853E2BEE35340093783D /* ForgotPassDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ForgotPassDM.swift; sourceTree = "<group>"; };
9C0A85402BEE35670093783D /* ResetPassUserNameVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResetPassUserNameVM.swift; sourceTree = "<group>"; };
9C0A85422BEE3EC90093783D /* NewPasswordVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewPasswordVM.swift; sourceTree = "<group>"; };
9C1C69FB2C106C240035B2C7 /* ContactSupportVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactSupportVM.swift; sourceTree = "<group>"; };
9C27E15F2BDB6ECA00EC1DA9 /* UserDefaultsStruct.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDefaultsStruct.swift; sourceTree = "<group>"; };
9C27E1622BDB6F1900EC1DA9 /* AuthFunc.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthFunc.swift; sourceTree = "<group>"; };
9C27E1642BDB6FBC00EC1DA9 /* StoryBoardID.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoryBoardID.swift; sourceTree = "<group>"; };
@@ -349,6 +354,8 @@
9C7939162C0F23E900F5D6E6 /* LinkTypeEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkTypeEnum.swift; sourceTree = "<group>"; };
9C7939182C0F345000F5D6E6 /* ContactSupportVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactSupportVC.swift; sourceTree = "<group>"; };
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>"; };
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>"; };
@@ -379,6 +386,7 @@
buildActionMask = 2147483647;
files = (
522A93132C0DB5D50098FE49 /* JWPlayerKit in Frameworks */,
9C1C69FA2C106B290035B2C7 /* RSKPlaceholderTextView in Frameworks */,
525954512BEB5EB700191286 /* SkeletonView in Frameworks */,
619A5A1BD8BD968ADC83C106 /* Pods_WOKA.framework in Frameworks */,
);
@@ -464,6 +472,7 @@
522A931B2C0DE9150098FE49 /* AboutUsVc.swift */,
52BC3BE12C0E02EE002FACA6 /* FaqVC.swift */,
9C7939182C0F345000F5D6E6 /* ContactSupportVC.swift */,
9CA7C6BF2C1093E500D73742 /* ProfileVC.swift */,
);
path = Controller;
sourceTree = "<group>";
@@ -995,6 +1004,8 @@
isa = PBXGroup;
children = (
9C7939122C0EFCAE00F5D6E6 /* FaqVM.swift */,
9C1C69FB2C106C240035B2C7 /* ContactSupportVM.swift */,
9CA7C6C12C1095B600D73742 /* ProfileVM.swift */,
);
path = ViewModel;
sourceTree = "<group>";
@@ -1080,6 +1091,7 @@
packageProductDependencies = (
525954502BEB5EB700191286 /* SkeletonView */,
522A93122C0DB5D50098FE49 /* JWPlayerKit */,
9C1C69F92C106B290035B2C7 /* RSKPlaceholderTextView */,
);
productName = WOKA;
productReference = 523ED25A2BDA2BC700CFED02 /* WOKA.app */;
@@ -1157,6 +1169,7 @@
packageReferences = (
5259544F2BEB5EB700191286 /* XCRemoteSwiftPackageReference "SkeletonView" */,
522A93112C0DB5D50098FE49 /* XCRemoteSwiftPackageReference "JWPlayerKit-package" */,
9C1C69F82C106B290035B2C7 /* XCRemoteSwiftPackageReference "RSKPlaceholderTextView" */,
);
productRefGroup = 523ED25B2BDA2BC700CFED02 /* Products */;
projectDirPath = "";
@@ -1346,6 +1359,7 @@
525954172BE8CAD300191286 /* NetworkManager.swift in Sources */,
52B8D4DD2C04A25E00ED65F3 /* UIViewController+SideMenu.swift in Sources */,
525954292BEA079500191286 /* UserEmailVerifyDM.swift in Sources */,
9C1C69FC2C106C240035B2C7 /* ContactSupportVM.swift in Sources */,
52A3F6AF2BECC0690000BB0B /* LinkedChildVM.swift in Sources */,
525954252BE8F01600191286 /* ValueWrapper.swift in Sources */,
52A3F6A82BECBF2A0000BB0B /* LinkedChildCell.swift in Sources */,
@@ -1379,6 +1393,7 @@
52C1A4E12C05B69F007BAA50 /* UIApplicationSwitchRoot.swift in Sources */,
52663FF72BDFACF60001D8CE /* ShadowView.swift in Sources */,
9C535DC22C00B36900DA6DCD /* ThemeTwoVC.swift in Sources */,
9CA7C6C22C1095B600D73742 /* ProfileVM.swift in Sources */,
52D774F12BDFC53B001D87DE /* StringSubScript.swift in Sources */,
9CBE1B3F2C0F37B300CA6E61 /* DPDConstants.swift in Sources */,
52B8D4DA2C04A25E00ED65F3 /* Preferences.swift in Sources */,
@@ -1396,6 +1411,7 @@
525327D92BFCDDF700F64283 /* AuthFuncStartupSoundHandling.swift in Sources */,
52663FFB2BDFB1700001D8CE /* TextFieldShadow.swift in Sources */,
52C6E0212BE3ADE300E22D59 /* GenderEnum.swift in Sources */,
9CA7C6C02C1093E500D73742 /* ProfileVC.swift in Sources */,
525953D12BE8B2B200191286 /* LLSpinner.swift in Sources */,
52C6E0272BE3B46A00E22D59 /* SelectAvatarCell.swift in Sources */,
9C535DB82C0089B400DA6DCD /* ViewButtonAnimation.swift in Sources */,
@@ -1818,6 +1834,14 @@
version = 1.31.0;
};
};
9C1C69F82C106B290035B2C7 /* XCRemoteSwiftPackageReference "RSKPlaceholderTextView" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/ruslanskorb/RSKPlaceholderTextView.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 8.0.0;
};
};
/* End XCRemoteSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
@@ -1831,6 +1855,11 @@
package = 5259544F2BEB5EB700191286 /* XCRemoteSwiftPackageReference "SkeletonView" */;
productName = SkeletonView;
};
9C1C69F92C106B290035B2C7 /* RSKPlaceholderTextView */ = {
isa = XCSwiftPackageProductDependency;
package = 9C1C69F82C106B290035B2C7 /* XCRemoteSwiftPackageReference "RSKPlaceholderTextView" */;
productName = RSKPlaceholderTextView;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 523ED2522BDA2BC700CFED02 /* Project object */;

View File

@@ -56,7 +56,6 @@ extension ResetPassUserNameVC : UITextFieldDelegate{
textField.hideError()
if !string.numberAndCharacterAndSpecialChar(){return false}
return ValidatorClass.sharedInstanec.limitCharacter(length: 16,textField, shouldChangeCharactersIn: range, replacementString: string)
default:
return true
}

View File

@@ -23,6 +23,7 @@ extension K{
static let genderSel = "Please select Gender."
static let shortPass = "Password is too short."
static let shortUsername = "Username is too short."
static let shortName = "Name is too short."
static let userNameVerify = "Verifying Username"
static let intrest = "Please select intrest"
static let avatar = "Please select avatar"

View File

@@ -47,6 +47,7 @@ extension K{
static let aboutUsVc = "AboutUsVc"
static let faqVC = "FaqVC"
static let contactSupportVC = "ContactSupportVC"
static let profileVC = "ProfileVC"
}
}
}

View File

@@ -40,3 +40,30 @@ class TextFieldShadow: UITextField {
innerShadow.cornerRadius = self.frame.size.height/2
}
}
extension UIView {
func applyInnerShadow(radius : CGFloat) {
let innerShadow = CALayer()
layer.addSublayer(innerShadow)
// Inner shadow setup
innerShadow.frame = bounds
// Shadow path (1pt ring around bounds)
let radius = radius
let path = UIBezierPath(roundedRect: innerShadow.bounds.insetBy(dx: -1, dy: -1), cornerRadius: radius)
let cutout = UIBezierPath(roundedRect: innerShadow.bounds, cornerRadius: radius).reversing()
path.append(cutout)
innerShadow.shadowPath = path.cgPath
innerShadow.masksToBounds = true
// Shadow properties
innerShadow.shadowColor = UIColor.black.cgColor
innerShadow.shadowOffset = CGSize(width: 0, height: 1.2)
innerShadow.shadowOpacity = 0.8
innerShadow.shadowRadius = 2
innerShadow.cornerRadius = radius
}
}

View File

@@ -52,10 +52,10 @@
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="gYe-fj-SXZ">
<autoresizingMask key="autoresizingMask"/>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<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"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</textAttributes>
</navigationBar>
<nil name="viewControllers"/>
@@ -79,7 +79,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="1026"/>
<rect key="frame" x="0.0" y="20" width="335" height="1068"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Xny-eg-3V4">
<rect key="frame" x="25" y="0.0" width="295" height="30"/>
@@ -326,7 +326,7 @@
</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="244"/>
<rect key="frame" x="25" y="604" width="295" height="286"/>
<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="108" height="34"/>
@@ -368,15 +368,22 @@
<action selector="btnTapped:" destination="yYJ-KT-PYn" eventType="touchUpInside" id="GKF-bY-Dzo"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YDN-fb-TJo">
<rect key="frame" x="0.0" y="168" width="89" 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 Orders"/>
</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="168" width="153" height="34"/>
<rect key="frame" x="0.0" y="210" 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"/>
<rect key="frame" x="0.0" y="252" 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"/>
@@ -385,7 +392,7 @@
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="eEN-Gz-Lba">
<rect key="frame" x="25" y="878" width="295" height="148"/>
<rect key="frame" x="25" y="920" 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"/>
@@ -514,12 +521,13 @@
</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="addChildBtn" destination="ol4-co-NoI" id="utf-rG-dMo"/>
<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="myOrderBtn" destination="YDN-fb-TJo" id="0dt-xK-kKP"/>
<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"/>
@@ -932,10 +940,10 @@
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemCyanColor">
<color red="0.1960784314" green="0.67843137249999996" blue="0.90196078430000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.19607843137254902" green="0.67843137254901964" blue="0.90196078431372551" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemGreenColor">
<color red="0.20392156859999999" green="0.78039215689999997" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.20392156862745098" green="0.7803921568627451" blue="0.34901960784313724" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>

View File

@@ -81,8 +81,21 @@ class AuthFunc{
return accessToken ?? ""
}
/*
Return user ID from Saved user data
*/
func getUserID() -> String{
let userID = AuthFunc.shareInstance.userData?.id?.toString()
return userID ?? ""
}
// MARK: - Get & Set the User Type
func getUserType() -> Int?{
/*
1- kid , 2 - guardian , 3 - guest
*/
let language = UserDefaults.standard.integer(forKey: K.UserDefaultsStruct.userType)
return language
}
@@ -116,6 +129,8 @@ class AuthFunc{
//Reset All to defaults
UserDefaults.standard.setValue(nil, forKey: K.UserDefaultsStruct.themeDefault)
UserDefaults.standard.setValue(nil, forKey: K.UserDefaultsStruct.isUserLogined)
UserDefaults.standard.setValue(nil, forKey: K.UserDefaultsStruct.userAccessToken)
UserDefaults.standard.setValue(nil, forKey: K.UserDefaultsStruct.userType)
userData = nil
selectedTheme = .theme1
}

View File

@@ -57,6 +57,9 @@ struct APIEndPoints {
struct SideBarNav{
static let faq_listing = makeURL(path: "faq_listing")
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")
}
// Other endpoint categories...

View File

@@ -56,7 +56,13 @@ class SplashVM{
}
func getUserData(){
if AuthFunc.shareInstance.getUserType() == 3{
//setusertype
AuthFunc.shareInstance.userData = UserDataDM.ResultData(id: nil, birthdate: nil, email: nil, avtar: nil, userType: "3", languageMasterID: nil, lastLogin: nil, rememberToken: nil, childDetail: nil, language: nil, alreadyLoggedIn: nil)
UIApplication.setRootView(SideMenuController.instantiate(from: .Home))
return
}
/*
If user is guest then dont do the nw call
*/
@@ -80,6 +86,7 @@ class SplashVM{
guard let data = data.data?.result else{return}
AuthFunc.shareInstance.userData = data
UIApplication.setRootView(SideMenuController.instantiate(from: .Home))
print("User Token --> ", AuthFunc.shareInstance.getAccessToken())
default:
break
}

View File

@@ -6,44 +6,38 @@
//
import UIKit
import RSKPlaceholderTextView
class ContactSupportVC: UIViewController {
@IBOutlet weak var supportGirlImage: UIImageView!
let dropDownModule = DropDown()
var dataSource = [String]()
@IBOutlet weak var bottomArrow: UIImageView!
@IBOutlet weak var subjectMainStack: UIStackView!
@IBOutlet weak var subjectStack: UIStackView!
@IBOutlet weak var messageStack: UIStackView!
@IBOutlet weak var subjectLabel: UILabel!
@IBOutlet weak var messageTF: UITextView!
@IBOutlet weak var messageTextView: RSKPlaceholderTextView!
@IBOutlet weak var submitBtn: LocalisedElementsButton!
@IBOutlet weak var emailStack: UIStackView!
@IBOutlet weak var nameStack: UIStackView!
@IBOutlet weak var emailTF: TextFieldShadow!
@IBOutlet weak var nameTF: TextFieldShadow!
@IBOutlet weak var assistanceLabel: UILabel!
var vm = ContactSupportVM()
// MARK: - View LifeCycle
override func viewDidLoad() {
super.viewDidLoad()
self.title = "Woka Support"
let color1 = #colorLiteral(red: 0.7294117647, green: 0.7529411765, blue: 0.3803921569, alpha: 1)
let color2 = #colorLiteral(red: 0.1843137255, green: 0.2156862745, blue: 0.0431372549, alpha: 1)
self.view.applyGradient(colors: [color1, color2], startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0, y: 0.8))
vm.vc = self
vm.initView()
let color3 = #colorLiteral(red: 0.968627451, green: 0.7882352941, blue: 0.1294117647, alpha: 1)
let color4 = #colorLiteral(red: 0.968627451, green: 0.4196078431, blue: 0.1098039216, alpha: 1)
self.submitBtn.applyGradient(colors: [color3, color4], startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0, y: 0.8))
self.submitBtn.roundCorner()
supportGirlImage.roundCorner()
subjectStack.roundCorner()
messageTF.textContainerInset = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)
dataSource = ["Query" , "Complaint", "Suggestion", "Other"]
initDropDown()
bottomArrow.addTapGesture {
self.dropDownModule.show()
}
subjectLabel.addTapGesture {
self.dropDownModule.show()
}
navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
navigationController?.navigationBar.shadowImage = UIImage()
}
override func viewWillAppear(_ animated: Bool) {
@@ -56,42 +50,109 @@ class ContactSupportVC: UIViewController {
navigationController?.setNavigationBarHidden(true, animated: animated)
}
// MARK: - Button Click Handler
@IBAction func submitBtnTapped(_ sender: LocalisedElementsButton) {
if subjectLabel.text?.lowercased() == "select subject"{
/*
if user is guest check for name and email
*/
if AuthFunc.shareInstance.getUserType() == 3{
if emailTF.text != nil{
//validate email fiirst
let emailValidate = EmailValidation(email: emailTF.text!).validate()
if emailValidate != .isCorrect{
emailTF.rightView?.isHidden = false
emailTF.setError(emailValidate.rawValue.localized(loc: AuthFunc.shareInstance.languageSelected.rawValue), show: true)
return
}
}
if nameTF.text!.count < 3{
/*
Check for username
*/
nameTF.rightView?.isHidden = false
nameTF.setError(K.ConstantString.shortName.localized(loc: AuthFunc.shareInstance.languageSelected.rawValue), show: true)
return
}
}
if subjectLabel.text?.lowercased() == "select subject" || subjectLabel.text == nil{
let sb = UIStoryboard(name: K.StoryBoard.customAlerts, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.CustomAlerts.alertCustomVC) as! AlertCustomVC
vcPush.contentLabel = "Please select subject".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
vcPush.mainTitleText = "Error".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
// vcPush.onDoneBlock = { isDone in }
vcPush.modalPresentationStyle = .overCurrentContext
vcPush.modalTransitionStyle = .crossDissolve
self.present(vcPush, animated: true)
return
}
}
// this func will initialize the dropdown menu
func initDropDown(){
dropDownModule.anchorView = subjectStack
dropDownModule.dataSource = dataSource
dropDownModule.cornerRadius = 10
dropDownModule.bottomOffset = CGPoint(x: 0, y:(dropDownModule.anchorView?.plainView.bounds.height)!)
dropDownModule.topOffset = CGPoint(x: 0, y:-(dropDownModule.anchorView?.plainView.bounds.height)!)
dropDownModule.direction = .bottom
dropDownModule.textFont = FontCustom.shareInstance.customFont(fontName: .Exo2_Medium, size: 16)
dropDownModule.shadowColor = UIColor.appColor(.TextDarkBlue)!
dropDownModule.backgroundColor = .white
dropDownModule.shadowOffset = CGSize(width: 0, height: 1)
dropDownModule.separatorColor = UIColor.lightGray
dropDownModule.width = subjectStack.frame.width
dropDownModule.selectionBackgroundColor = UIColor.appColor(.TextDarkBlue)!
dropDownModule.selectedTextColor = UIColor.white
dropDownModule.selectRow(0)
dropDownModule.selectionAction = { [unowned self] (index: Int, item: String) in
self.subjectLabel.text = item
print(index , item)
if messageTextView.text.count < 3 || messageTextView.text == nil{
let sb = UIStoryboard(name: K.StoryBoard.customAlerts, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.CustomAlerts.alertCustomVC) as! AlertCustomVC
vcPush.contentLabel = "Message is too short".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
vcPush.mainTitleText = "Error".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
vcPush.modalPresentationStyle = .overCurrentContext
vcPush.modalTransitionStyle = .crossDissolve
self.present(vcPush, animated: true)
return
}
if AuthFunc.shareInstance.getUserType() == 3{ // He is Guest
vm.guestContactSupportApiCall()
}else{
vm.contactSupportApiCall()
}
}
}
// MARK: - Textfield, TextView Delegate
extension ContactSupportVC : UITextFieldDelegate , UITextViewDelegate{
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool{
switch textField{
case emailTF:
if let rightView = textField.rightView {
// Hide the right view
rightView.isHidden = true
// Check if the right view is hidden
if rightView.isHidden {
// If hidden, hide the associated error view
if let errorView = errorViews.object(forKey: emailTF) {
errorView.isHidden = true
}
}
}
return ValidatorClass.sharedInstanec.limitCharacter(length: 255,textField, shouldChangeCharactersIn: range, replacementString: string)
case nameTF:
textField.hideError()
if !string.nameCharacterOnly(){return false}
return ValidatorClass.sharedInstanec.limitCharacter(length: 50,textField, shouldChangeCharactersIn: range, replacementString: string)
default:
return true
}
}
func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool {
if !text.nameCharacterOnly(){return false}
return ValidatorClass.sharedInstanec.limitCharacterTV(length: 200,textView, shouldChangeCharactersIn: range, replacementString: text)
}
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
switch textField{
case emailTF:
nameTF.becomeFirstResponder()
case nameTF:
textField.resignFirstResponder()
default:
break
}
return true
}
}

View File

@@ -0,0 +1,90 @@
//
// ProfileVC.swift
// WOKA
//
// Created by Bilal on 05/06/2024.
//
import UIKit
class ProfileVC: UIViewController {
@IBOutlet weak var avatarImage: UIImageView!
@IBOutlet weak var userNameLabel: UILabel!
@IBOutlet weak var fullNameTF: TextFieldShadow!
@IBOutlet weak var emailTF: TextFieldShadow!
@IBOutlet weak var dob: UIDatePicker!
@IBOutlet weak var boyView: UIView!
@IBOutlet weak var girlView: UIView!
@IBOutlet weak var nextBtn: LocalisedElementsButton!
var vm = ProfileVM()
override func viewDidLoad() {
super.viewDidLoad()
vm.vc = self
vm.initView()
self.title = "Profile"
navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
navigationController?.navigationBar.shadowImage = UIImage()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.setNavigationBarHidden(false, animated: animated)
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
navigationController?.setNavigationBarHidden(true, animated: animated)
}
@IBAction func nextBtnTapped(_ sender: LocalisedElementsButton) {
if fullNameTF.text!.count < 3 {
let sb = UIStoryboard(name: K.StoryBoard.customAlerts, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.CustomAlerts.alertCustomVC) as! AlertCustomVC
vcPush.contentLabel = "Name is too short".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
vcPush.mainTitleText = "Error".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
vcPush.modalPresentationStyle = .overCurrentContext
vcPush.modalTransitionStyle = .crossDissolve
self.present(vcPush, animated: true)
return
}
vm.updateUserData()
}
}
// MARK: - Textfield
extension ProfileVC : UITextFieldDelegate {
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool{
switch textField{
case fullNameTF:
// check if the latest name is same as the stored name
if let text = textField.text, let textRange = Range(range, in: text) {
let updatedText = text.replacingCharacters(in: textRange, with: string)
vm.checkChanges(name: updatedText)
}
if !string.nameCharacterOnly(){return false}
return ValidatorClass.sharedInstanec.limitCharacter(length: 50,textField, shouldChangeCharactersIn: range, replacementString: string)
default:
return true
}
}
// func textFieldShouldReturn(_ textField: UITextField) -> Bool {
// switch textField{
// case emailTF:
// nameTF.becomeFirstResponder()
// case nameTF:
// textField.resignFirstResponder()
// default:
// break
// }
// return true
// }
//
}

View File

@@ -13,6 +13,9 @@
<array key="Exo2-Bold.ttf">
<string>Exo2-Bold</string>
</array>
<array key="Exo2-Medium.ttf">
<string>Exo2-Medium</string>
</array>
<array key="Exo2-Regular.ttf">
<string>Exo2-Regular</string>
</array>
@@ -124,78 +127,181 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="49" translatesAutoresizingMaskIntoConstraints="NO" id="5wC-Rc-bx0">
<rect key="frame" x="10" y="78" width="394" height="515"/>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="V9T-70-DQH">
<rect key="frame" x="0.0" y="58" width="414" height="729"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="WokaLogo" translatesAutoresizingMaskIntoConstraints="NO" id="qyO-EY-Xz8">
<rect key="frame" x="15" y="10" width="364" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="LuW-Ab-BCC"/>
</constraints>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7Pn-Dg-gUD">
<rect key="frame" x="15" y="109" width="364" height="120"/>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="49" translatesAutoresizingMaskIntoConstraints="NO" id="5wC-Rc-bx0">
<rect key="frame" x="0.0" y="0.0" width="414" height="569"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="SupportGirlImage" translatesAutoresizingMaskIntoConstraints="NO" id="I2o-ts-y1X">
<rect key="frame" x="122" y="0.0" width="120" height="120"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="WokaLogo" translatesAutoresizingMaskIntoConstraints="NO" id="qyO-EY-Xz8">
<rect key="frame" x="15" y="10" width="384" height="50"/>
<constraints>
<constraint firstAttribute="width" secondItem="I2o-ts-y1X" secondAttribute="height" multiplier="1:1" id="wV8-De-yey"/>
<constraint firstAttribute="height" constant="50" id="LuW-Ab-BCC"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="I2o-ts-y1X" firstAttribute="top" secondItem="7Pn-Dg-gUD" secondAttribute="top" id="HuI-ik-V3K"/>
<constraint firstAttribute="bottom" secondItem="I2o-ts-y1X" secondAttribute="bottom" id="KeN-eI-CPR"/>
<constraint firstItem="I2o-ts-y1X" firstAttribute="centerX" secondItem="7Pn-Dg-gUD" secondAttribute="centerX" id="ctt-K2-8CW"/>
<constraint firstAttribute="height" constant="120" id="wKv-TV-ozO"/>
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3td-Os-A3X">
<rect key="frame" x="15" y="278" width="364" height="50"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Select Subject" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CoP-oH-nkk">
<rect key="frame" x="15" y="10" width="309" height="30"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="18"/>
<nil key="textColor"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7Pn-Dg-gUD">
<rect key="frame" x="15" y="109" width="384" height="120"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="SupportGirlImage" translatesAutoresizingMaskIntoConstraints="NO" id="I2o-ts-y1X">
<rect key="frame" x="132" y="0.0" width="120" height="120"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" secondItem="I2o-ts-y1X" secondAttribute="height" multiplier="1:1" id="wV8-De-yey"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="I2o-ts-y1X" firstAttribute="top" secondItem="7Pn-Dg-gUD" secondAttribute="top" id="HuI-ik-V3K"/>
<constraint firstAttribute="bottom" secondItem="I2o-ts-y1X" secondAttribute="bottom" id="KeN-eI-CPR"/>
<constraint firstItem="I2o-ts-y1X" firstAttribute="centerX" secondItem="7Pn-Dg-gUD" secondAttribute="centerX" id="ctt-K2-8CW"/>
<constraint firstAttribute="height" constant="120" id="wKv-TV-ozO"/>
</constraints>
</view>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Please ask your guardian to contact us for assistance." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xDI-Te-7uQ">
<rect key="frame" x="15" y="253.5" width="384" height="0.0"/>
<fontDescription key="fontDescription" name="Exo2-Medium" family="Exo 2" pointSize="22"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="SupportBottomArrow" translatesAutoresizingMaskIntoConstraints="NO" id="Msa-75-1Cg">
<rect key="frame" x="324" y="10" width="25" height="30"/>
<color key="tintColor" name="TextDarkBlue"/>
<constraints>
<constraint firstAttribute="width" constant="25" id="lTQ-KK-usc"/>
</constraints>
</imageView>
<stackView hidden="YES" opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="vjt-jD-4f3" userLabel="Email Stack">
<rect key="frame" x="15" y="253.5" width="384" height="55"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="E-Mail" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9Ma-au-unt">
<rect key="frame" x="0.0" y="0.0" width="384" height="0.0"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="18"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Enter your email" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="zMI-2r-pRQ" customClass="TextFieldShadow" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="5" width="384" height="50"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="tintColor" name="TextDarkBlue"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="h9v-zZ-lri"/>
</constraints>
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="16"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" enablesReturnKeyAutomatically="YES" textContentType="username"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="paddingLeftCustom">
<real key="value" value="25"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="paddingRightCustom">
<real key="value" value="25"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textField>
</subviews>
</stackView>
<stackView hidden="YES" opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="2qP-Pd-7IW" userLabel="Name">
<rect key="frame" x="15" y="253.5" width="384" height="55"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Name" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9nm-R6-MHb">
<rect key="frame" x="0.0" y="0.0" width="384" height="0.0"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="18"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Enter your name" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="fiK-Gg-JDj" customClass="TextFieldShadow" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="5" width="384" height="50"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="tintColor" name="TextDarkBlue"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="GR2-AM-eTH"/>
</constraints>
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="16"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" enablesReturnKeyAutomatically="YES" textContentType="username"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="paddingLeftCustom">
<real key="value" value="25"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="paddingRightCustom">
<real key="value" value="25"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textField>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="SlR-If-pxh" userLabel="Subject">
<rect key="frame" x="15" y="278" width="384" height="77"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Subject" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="k7q-3i-LMr">
<rect key="frame" x="0.0" y="0.0" width="384" height="22"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="18"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3td-Os-A3X">
<rect key="frame" x="0.0" y="27" width="384" height="50"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Select Subject" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CoP-oH-nkk">
<rect key="frame" x="15" y="10" width="329" height="30"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="18"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="SupportBottomArrow" translatesAutoresizingMaskIntoConstraints="NO" id="Msa-75-1Cg">
<rect key="frame" x="344" y="10" width="25" height="30"/>
<color key="tintColor" name="TextDarkBlue"/>
<constraints>
<constraint firstAttribute="width" constant="25" id="lTQ-KK-usc"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="UUM-zp-6dX"/>
</constraints>
<edgeInsets key="layoutMargins" top="10" left="15" bottom="10" right="15"/>
</stackView>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="gXQ-Yb-IGC" userLabel="Message">
<rect key="frame" x="15" y="404" width="384" height="155"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Message" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="csz-ff-Kvd">
<rect key="frame" x="0.0" y="0.0" width="384" height="22"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="18"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PNw-eT-0fE" customClass="RSKPlaceholderTextView" customModule="RSKPlaceholderTextView">
<rect key="frame" x="0.0" y="27" width="384" height="128"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="tintColor" name="TextDarkBlue"/>
<constraints>
<constraint firstAttribute="height" constant="128" id="T3n-bl-UGJ"/>
</constraints>
<color key="textColor" systemColor="labelColor"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="18"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="15"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="string" keyPath="placeholder" value="Enter message"/>
</userDefinedRuntimeAttributes>
</textView>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="UUM-zp-6dX"/>
</constraints>
<edgeInsets key="layoutMargins" top="10" left="15" bottom="10" right="15"/>
</stackView>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PNw-eT-0fE">
<rect key="frame" x="15" y="377" width="364" height="128"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="128" id="T3n-bl-UGJ"/>
</constraints>
<mutableString key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.</mutableString>
<color key="textColor" systemColor="labelColor"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="18"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="15"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textView>
</subviews>
<edgeInsets key="layoutMargins" top="10" left="15" bottom="10" right="15"/>
</stackView>
<constraints>
<constraint firstItem="5wC-Rc-bx0" firstAttribute="width" secondItem="1tJ-fU-P2f" secondAttribute="width" multiplier="5.44444" id="2Ws-1c-lq6"/>
<constraint firstItem="1Lx-Og-mjU" firstAttribute="trailing" secondItem="5wC-Rc-bx0" secondAttribute="trailing" id="ByB-cE-NDn"/>
<constraint firstItem="5wC-Rc-bx0" firstAttribute="top" secondItem="V9T-70-DQH" secondAttribute="top" id="HLh-6N-vbO"/>
<constraint firstItem="5wC-Rc-bx0" firstAttribute="leading" secondItem="1tJ-fU-P2f" secondAttribute="leading" id="cgp-ge-Ptf"/>
<constraint firstAttribute="bottom" secondItem="5wC-Rc-bx0" secondAttribute="bottom" id="ruu-X9-L8B"/>
</constraints>
<viewLayoutGuide key="contentLayoutGuide" id="1tJ-fU-P2f"/>
<viewLayoutGuide key="frameLayoutGuide" id="1Lx-Og-mjU"/>
</scrollView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sxV-6l-8uX" customClass="LocalisedElementsButton" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="30" y="782" width="354" height="50"/>
<rect key="frame" x="30" y="792" width="354" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="Noq-ob-uk0"/>
</constraints>
@@ -213,18 +319,26 @@
<viewLayoutGuide key="safeArea" id="m71-vF-iJV"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="5wC-Rc-bx0" firstAttribute="top" secondItem="m71-vF-iJV" secondAttribute="top" constant="30" id="2Io-Qv-hbb"/>
<constraint firstItem="m71-vF-iJV" firstAttribute="trailing" secondItem="5wC-Rc-bx0" secondAttribute="trailing" constant="10" id="9Uv-Ok-J32"/>
<constraint firstItem="sxV-6l-8uX" firstAttribute="top" secondItem="V9T-70-DQH" secondAttribute="bottom" constant="5" id="3W1-fF-kTq"/>
<constraint firstItem="V9T-70-DQH" firstAttribute="leading" secondItem="m71-vF-iJV" secondAttribute="leading" id="Gsj-Gj-FdY"/>
<constraint firstItem="sxV-6l-8uX" firstAttribute="leading" secondItem="m71-vF-iJV" secondAttribute="leading" constant="30" id="KHU-DA-aHF"/>
<constraint firstItem="m71-vF-iJV" firstAttribute="trailing" secondItem="sxV-6l-8uX" secondAttribute="trailing" constant="30" id="LnS-f4-2YP"/>
<constraint firstItem="5wC-Rc-bx0" firstAttribute="leading" secondItem="m71-vF-iJV" secondAttribute="leading" constant="10" id="m8S-Rn-Tte"/>
<constraint firstItem="m71-vF-iJV" firstAttribute="bottom" secondItem="sxV-6l-8uX" secondAttribute="bottom" constant="30" id="smy-GF-GI2"/>
<constraint firstItem="V9T-70-DQH" firstAttribute="trailing" secondItem="m71-vF-iJV" secondAttribute="trailing" id="O1J-fS-FZ3"/>
<constraint firstItem="V9T-70-DQH" firstAttribute="top" secondItem="m71-vF-iJV" secondAttribute="top" constant="10" id="h59-hq-3be"/>
<constraint firstItem="m71-vF-iJV" firstAttribute="bottom" secondItem="sxV-6l-8uX" secondAttribute="bottom" constant="20" id="smy-GF-GI2"/>
</constraints>
</view>
<connections>
<outlet property="assistanceLabel" destination="xDI-Te-7uQ" id="bgf-Y5-kCP"/>
<outlet property="bottomArrow" destination="Msa-75-1Cg" id="ggE-Yq-RQ0"/>
<outlet property="messageTF" destination="PNw-eT-0fE" id="eOq-VM-ZNL"/>
<outlet property="emailStack" destination="vjt-jD-4f3" id="g5v-vO-mWw"/>
<outlet property="emailTF" destination="zMI-2r-pRQ" id="PH2-hg-t1i"/>
<outlet property="messageStack" destination="gXQ-Yb-IGC" id="bOq-Df-hO3"/>
<outlet property="messageTextView" destination="PNw-eT-0fE" id="Ess-Qr-Y2c"/>
<outlet property="nameStack" destination="2qP-Pd-7IW" id="nbT-va-jnq"/>
<outlet property="nameTF" destination="fiK-Gg-JDj" id="a4y-82-hzg"/>
<outlet property="subjectLabel" destination="CoP-oH-nkk" id="Hvm-1d-Y9L"/>
<outlet property="subjectMainStack" destination="SlR-If-pxh" id="ChJ-sx-NaZ"/>
<outlet property="subjectStack" destination="3td-Os-A3X" id="HbV-Yi-S3Y"/>
<outlet property="submitBtn" destination="sxV-6l-8uX" id="L1t-GT-ohc"/>
<outlet property="supportGirlImage" destination="I2o-ts-y1X" id="vMZ-Ge-MYx"/>
@@ -234,13 +348,296 @@
</objects>
<point key="canvasLocation" x="1640.5797101449277" y="-34.151785714285715"/>
</scene>
<!--ProfileVC-->
<scene sceneID="kb8-Xy-bP2">
<objects>
<viewController storyboardIdentifier="ProfileVC" id="3Go-CS-EAu" customClass="ProfileVC" customModule="WOKA" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="e7j-bR-HZw">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="BackgroundSplash" translatesAutoresizingMaskIntoConstraints="NO" id="g6d-JB-SYC">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="F30-Wd-baG" customClass="LocalisedElementsButton" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="15" y="802" width="384" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="OT7-Or-XDp"/>
</constraints>
<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="UPDATE">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="nextBtnTapped:" destination="3Go-CS-EAu" eventType="touchUpInside" id="oPL-pu-nXc"/>
</connections>
</button>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="L3p-QH-kol">
<rect key="frame" x="0.0" y="48" width="414" height="726"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="35" translatesAutoresizingMaskIntoConstraints="NO" id="uGa-bS-ctr">
<rect key="frame" x="0.0" y="30" width="414" height="730.5"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="Hvk-Z2-3ji">
<rect key="frame" x="20" y="0.0" width="374" height="116.5"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rbx-B4-wDn">
<rect key="frame" x="0.0" y="0.0" width="374" height="80"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="picture" translatesAutoresizingMaskIntoConstraints="NO" id="ho3-bu-sXX">
<rect key="frame" x="147" y="0.0" width="80" height="80"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" secondItem="ho3-bu-sXX" secondAttribute="height" multiplier="1:1" id="AGb-jB-evg"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="ho3-bu-sXX" secondAttribute="bottom" id="Ype-NO-q9y"/>
<constraint firstItem="ho3-bu-sXX" firstAttribute="centerX" secondItem="rbx-B4-wDn" secondAttribute="centerX" id="dXh-Er-U4c"/>
<constraint firstAttribute="height" constant="80" id="f1N-hm-wYO"/>
<constraint firstItem="ho3-bu-sXX" firstAttribute="top" secondItem="rbx-B4-wDn" secondAttribute="top" id="yz2-5i-Szm"/>
</constraints>
</view>
<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="clP-p2-fQj">
<rect key="frame" x="0.0" y="85" width="374" height="31.5"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="26"/>
<color key="textColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<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">
<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"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Enter your name" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="arD-av-w7V" customClass="TextFieldShadow" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="34.5" width="374" height="50"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="tintColor" name="TextDarkBlue"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="lcA-VI-2pS"/>
</constraints>
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="16"/>
<textInputTraits key="textInputTraits" autocapitalizationType="words" autocorrectionType="no" enablesReturnKeyAutomatically="YES" textContentType="name"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="paddingLeftCustom">
<real key="value" value="25"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="paddingRightCustom">
<real key="value" value="25"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textField>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Avp-CK-Tfh">
<rect key="frame" x="0.0" y="99.5" width="374" height="0.0"/>
<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"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<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">
<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"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Enter your email" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="fZS-d6-t0h" customClass="TextFieldShadow" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="34.5" width="374" height="50"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="tintColor" name="TextDarkBlue"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="8rk-Pu-VYC"/>
</constraints>
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="16"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" keyboardType="emailAddress" enablesReturnKeyAutomatically="YES" textContentType="email"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="paddingLeftCustom">
<real key="value" value="25"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="paddingRightCustom">
<real key="value" value="25"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textField>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JVa-mg-KVN">
<rect key="frame" x="0.0" y="99.5" width="374" height="0.0"/>
<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"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="dTX-xS-I84" userLabel="GENDER">
<rect key="frame" x="20" y="420.5" width="374" height="138"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="YOUR GENDER" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DEA-gr-l2e" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="374" 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"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="60" translatesAutoresizingMaskIntoConstraints="NO" id="KhR-hP-jeC">
<rect key="frame" x="0.0" y="38" width="374" height="100"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hhf-2M-dfy">
<rect key="frame" x="30" y="0.0" width="127" height="100"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="evt-gm-S0p">
<rect key="frame" x="39" y="10" width="49.5" height="77"/>
<subviews>
<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">
<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"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="evt-gm-S0p" firstAttribute="top" secondItem="hhf-2M-dfy" secondAttribute="top" constant="10" id="6mu-Ey-K4L"/>
<constraint firstItem="evt-gm-S0p" firstAttribute="centerX" secondItem="hhf-2M-dfy" secondAttribute="centerX" id="urS-Em-KjV"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jEd-Lp-8oQ">
<rect key="frame" x="217" y="0.0" width="127" height="100"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="9Tk-3P-f19">
<rect key="frame" x="39.5" y="10" width="48.5" height="77"/>
<subviews>
<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">
<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"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="9Tk-3P-f19" firstAttribute="centerX" secondItem="jEd-Lp-8oQ" secondAttribute="centerX" id="028-gD-AoZ"/>
<constraint firstItem="9Tk-3P-f19" firstAttribute="top" secondItem="jEd-Lp-8oQ" secondAttribute="top" constant="10" id="sb9-gJ-935"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstAttribute="height" constant="100" id="tOc-Ls-K1I"/>
</constraints>
<edgeInsets key="layoutMargins" top="0.0" left="30" bottom="0.0" right="30"/>
</stackView>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="tlL-6r-4eb" userLabel="DOB">
<rect key="frame" x="20" y="593.5" width="374" height="137"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="WHEN IS YOUR BIRTHDAY?" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="b73-2Y-tGO" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="374" 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"/>
<nil key="highlightedColor"/>
</label>
<datePicker contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" datePickerMode="date" style="wheels" translatesAutoresizingMaskIntoConstraints="NO" id="kau-8K-eQs">
<rect key="frame" x="0.0" y="37" width="374" height="100"/>
<constraints>
<constraint firstAttribute="height" constant="100" id="QOf-a4-wdZ"/>
</constraints>
</datePicker>
</subviews>
</stackView>
</subviews>
<edgeInsets key="layoutMargins" top="0.0" left="20" bottom="0.0" right="20"/>
</stackView>
</subviews>
<constraints>
<constraint firstItem="sKE-HE-2Wd" firstAttribute="trailing" secondItem="uGa-bS-ctr" secondAttribute="trailing" id="34g-Bg-e1O"/>
<constraint firstAttribute="bottom" secondItem="uGa-bS-ctr" secondAttribute="bottom" id="5iT-zR-Ce9"/>
<constraint firstItem="uGa-bS-ctr" firstAttribute="width" secondItem="PcC-9W-oMP" secondAttribute="width" id="Aml-EY-n4I"/>
<constraint firstItem="uGa-bS-ctr" firstAttribute="top" secondItem="L3p-QH-kol" secondAttribute="top" constant="30" id="UaC-80-lb0"/>
<constraint firstItem="uGa-bS-ctr" firstAttribute="leading" secondItem="PcC-9W-oMP" secondAttribute="leading" id="bYx-69-gaZ"/>
</constraints>
<viewLayoutGuide key="contentLayoutGuide" id="PcC-9W-oMP"/>
<viewLayoutGuide key="frameLayoutGuide" id="sKE-HE-2Wd"/>
</scrollView>
</subviews>
<viewLayoutGuide key="safeArea" id="okb-Ec-xgD"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="g6d-JB-SYC" firstAttribute="top" secondItem="e7j-bR-HZw" secondAttribute="top" id="6ib-uV-Gm6"/>
<constraint firstItem="L3p-QH-kol" firstAttribute="top" secondItem="okb-Ec-xgD" secondAttribute="top" id="CYt-V6-ltc"/>
<constraint firstItem="L3p-QH-kol" firstAttribute="leading" secondItem="e7j-bR-HZw" secondAttribute="leading" id="FYi-ed-M3L"/>
<constraint firstItem="okb-Ec-xgD" firstAttribute="trailing" secondItem="L3p-QH-kol" secondAttribute="trailing" id="RCh-w7-orV"/>
<constraint firstItem="okb-Ec-xgD" firstAttribute="trailing" secondItem="F30-Wd-baG" secondAttribute="trailing" constant="15" id="VFM-07-eZd"/>
<constraint firstItem="okb-Ec-xgD" firstAttribute="bottom" secondItem="F30-Wd-baG" secondAttribute="bottom" constant="10" id="cKJ-DO-3lx"/>
<constraint firstAttribute="bottom" secondItem="g6d-JB-SYC" secondAttribute="bottom" id="cWL-KK-Eqi"/>
<constraint firstItem="F30-Wd-baG" firstAttribute="leading" secondItem="okb-Ec-xgD" secondAttribute="leading" constant="15" id="ndg-9v-HBz"/>
<constraint firstItem="F30-Wd-baG" firstAttribute="top" secondItem="L3p-QH-kol" secondAttribute="bottom" constant="28" id="r6N-BS-NYN"/>
<constraint firstItem="g6d-JB-SYC" firstAttribute="leading" secondItem="okb-Ec-xgD" secondAttribute="leading" id="sR1-sQ-aMi"/>
<constraint firstItem="g6d-JB-SYC" firstAttribute="trailing" secondItem="okb-Ec-xgD" secondAttribute="trailing" id="yao-hP-zj5"/>
</constraints>
</view>
<connections>
<outlet property="avatarImage" destination="ho3-bu-sXX" id="5he-I8-E47"/>
<outlet property="boyView" destination="hhf-2M-dfy" id="xpS-7T-XNH"/>
<outlet property="dob" destination="kau-8K-eQs" id="RuA-zK-WRs"/>
<outlet property="emailTF" destination="fZS-d6-t0h" id="UWZ-vf-jvH"/>
<outlet property="fullNameTF" destination="arD-av-w7V" id="OIu-nL-tkm"/>
<outlet property="girlView" destination="jEd-Lp-8oQ" id="X3G-wJ-yyH"/>
<outlet property="nextBtn" destination="F30-Wd-baG" id="UnR-xd-Qnk"/>
<outlet property="userNameLabel" destination="clP-p2-fQj" id="l4x-dR-FlC"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="ueQ-Yc-EST" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2466.666666666667" y="-34.151785714285715"/>
</scene>
</scenes>
<designables>
<designable name="arD-av-w7V">
<size key="intrinsicContentSize" width="119.5" height="21"/>
</designable>
<designable name="fZS-d6-t0h">
<size key="intrinsicContentSize" width="119" height="21"/>
</designable>
<designable name="fiK-Gg-JDj">
<size key="intrinsicContentSize" width="119.5" height="21"/>
</designable>
<designable name="zMI-2r-pRQ">
<size key="intrinsicContentSize" width="119" height="21"/>
</designable>
</designables>
<resources>
<image name="AboutKids" width="256" height="188"/>
<image name="AboutVector" width="569.33331298828125" height="538.66668701171875"/>
<image name="BackgroundSplash" width="428" height="926"/>
<image name="Boy" width="49.5" height="50"/>
<image name="Girl" width="48.5" height="50"/>
<image name="SupportBottomArrow" width="16" height="16"/>
<image name="SupportGirlImage" width="166" height="166"/>
<image name="WokaLogo" width="2224" height="450.5"/>
<image name="picture" width="512" height="512"/>
<namedColor name="TextDarkBlue">
<color red="0.10599999874830246" green="0.050999999046325684" blue="0.60399997234344482" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>

View File

@@ -0,0 +1,188 @@
//
// ContactSupportVM.swift
// WOKA
//
// Created by Bilal on 05/06/2024.
//
import UIKit
import Alamofire
class ContactSupportVM{
weak var vc : ContactSupportVC!
let dropDownModule = DropDown()
var dataSource = [String]()
func initView(){
let color1 = #colorLiteral(red: 0.7294117647, green: 0.7529411765, blue: 0.3803921569, alpha: 1)
let color2 = #colorLiteral(red: 0.1843137255, green: 0.2156862745, blue: 0.0431372549, alpha: 1)
vc.view.applyGradient(colors: [color1, color2], startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0, y: 0.8))
vc.supportGirlImage.roundCorner()
userTypeManipulations()
vc.emailTF.roundCorner()
vc.nameTF.roundCorner()
vc.nameTF.delegate = self.vc
vc.emailTF.delegate = self.vc
vc.messageTextView.delegate = self.vc
let color3 = #colorLiteral(red: 0.968627451, green: 0.7882352941, blue: 0.1294117647, alpha: 1)
let color4 = #colorLiteral(red: 0.968627451, green: 0.4196078431, blue: 0.1098039216, alpha: 1)
vc.submitBtn.applyGradient(colors: [color3, color4], startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0, y: 0.8))
vc.submitBtn.roundCorner()
vc.subjectStack.roundCorner()
vc.messageTextView.textContainerInset = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)
vc.messageTextView.applyInnerShadow(radius: 15)
vc.subjectStack.applyInnerShadow(radius: vc.subjectStack.frame.height / 2)
vc.nameTF.addRightButton(title: "", tintColor: UIColor.red, btnImage: UIImage(systemName: "exclamationmark.circle.fill"), target: self, action: #selector(errorName))
vc.nameTF.rightView?.isHidden = true
vc.emailTF.addRightButton(title: "", tintColor: UIColor.red, btnImage: UIImage(systemName: "exclamationmark.circle.fill"), target: self, action: #selector(errorEmail))
vc.emailTF.rightView?.isHidden = true
dataSource = ["Query" , "Complaint", "Suggestion", "Other"]
initDropDown()
vc.bottomArrow.addTapGesture {
self.dropDownModule.show()
}
vc.subjectLabel.addTapGesture {
self.dropDownModule.show()
}
}
@objc func errorName(){
let errorView = errorViews.object(forKey: vc.nameTF)
if let errorView = errorView {
errorView.isHidden.toggle()
}
}
@objc func errorEmail(){
let errorView = errorViews.object(forKey: vc.emailTF)
if let errorView = errorView {
errorView.isHidden.toggle()
}
}
private func userTypeManipulations(){
if let userType = AuthFunc.shareInstance.getUserType(){ // 1- kid , 2 - guardian , 3 - guest
switch userType{
case 1: // if th user is child dont let him contact support
vc.subjectMainStack.isHidden = true
vc.nameStack.isHidden = true
vc.emailStack.isHidden = true
vc.messageStack.isHidden = true
vc.submitBtn.isHidden = true
vc.assistanceLabel.isHidden = false
return
case 2:
break
case 3:
vc.nameStack.isHidden = false
vc.emailStack.isHidden = false
default:
break
}
}
}
func contactSupportApiCall(){
let params: Parameters = [
"user_id": AuthFunc.shareInstance.getUserID(),
"subject": vc.subjectLabel.text!,
"message": vc.messageTextView.text!,
]
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_queries_store, method: .post ,parameters: params,headers: headers) {(result : Result<BaseResponseModel<UserEmailVerifyDM>, NetworkManager.APIError>) in
switch result{
case .success(let data):
switch data.success{
case 0: // some error
Utilities.dismissProgressHUD()
self.vc.toast(msg: data.message ?? "Unrecognised error" , time: 2)
case 1: // Success
Utilities.dismissProgressHUD()
self.vc.toast(msg: data.message ?? "Message Sent", time: 1.5) {
self.vc.navigationController?.popViewController(animated: true)
}
default:
Utilities.dismissProgressHUD()
self.vc.toast(msg: K.ConstantString.unRecognised , time: 1)
}
case .failure(let error):
Utilities.dismissProgressHUD()
self.vc.toast(msg: error.localizedDescription , time: 2)
}
}
}
func guestContactSupportApiCall(){
let params: Parameters = [
"name": vc.nameTF.text!,
"email_id": vc.emailTF.text!,
"subject": vc.subjectLabel.text!,
"message": vc.messageTextView.text!,
]
let headers : HTTPHeaders = ["Accept-Language" : AuthFunc.shareInstance.languageSelected == .english ? "English" : "Hindi"]
Utilities.startProgressHUD()
NetworkManager.shareInstance.apiRequest(url: APIEndPoints.SideBarNav.guest_queries_store, method: .post ,parameters: params,headers: headers) {(result : Result<BaseResponseModel<UserEmailVerifyDM>, NetworkManager.APIError>) in
switch result{
case .success(let data):
switch data.success{
case 0: // some error
Utilities.dismissProgressHUD()
self.vc.toast(msg: data.message ?? "Unrecognised error" , time: 2)
case 1: // Success
Utilities.dismissProgressHUD()
self.vc.toast(msg: data.message ?? "Message Sent", time: 1.5) {
self.vc.navigationController?.popViewController(animated: true)
}
default:
Utilities.dismissProgressHUD()
self.vc.toast(msg: K.ConstantString.unRecognised , time: 1)
}
case .failure(let error):
Utilities.dismissProgressHUD()
self.vc.toast(msg: error.localizedDescription , time: 2)
}
}
}
// this func will initialize the dropdown menu
func initDropDown(){
dropDownModule.anchorView = vc.subjectStack
dropDownModule.dataSource = dataSource
dropDownModule.cornerRadius = 10
dropDownModule.bottomOffset = CGPoint(x: 0, y:(dropDownModule.anchorView?.plainView.bounds.height)!)
dropDownModule.topOffset = CGPoint(x: 0, y:-(dropDownModule.anchorView?.plainView.bounds.height)!)
dropDownModule.direction = .bottom
dropDownModule.textFont = FontCustom.shareInstance.customFont(fontName: .Exo2_Medium, size: 16)
dropDownModule.shadowColor = UIColor.appColor(.TextDarkBlue)!
dropDownModule.backgroundColor = .white
dropDownModule.shadowOffset = CGSize(width: 0, height: 1)
dropDownModule.separatorColor = UIColor.lightGray
dropDownModule.width = vc.subjectStack.frame.width
dropDownModule.selectionBackgroundColor = UIColor.appColor(.TextDarkBlue)!
dropDownModule.selectedTextColor = UIColor.white
dropDownModule.selectionAction = { [weak self] (index: Int, item: String) in
self?.vc.subjectLabel.text = item
print(index , item)
}
}
}

View File

@@ -0,0 +1,178 @@
//
// ProfileVM.swift
// WOKA
//
// Created by Bilal on 05/06/2024.
//
import UIKit
import Alamofire
class ProfileVM{
weak var vc : ProfileVC!
var gender = Int()
func initView(){
vc.boyView.roundCorner(radius: 25)
vc.girlView.roundCorner(radius: 25)
vc.fullNameTF.roundCorner()
vc.emailTF.roundCorner()
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)
vc.nextBtn.applyGradient(colors: [color1, color2], startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0.8, y: 0))
vc.nextBtn.roundCorner()
addTapGesture()
setUserData()
/*
Depnding on user type limit the date
*/
// if AuthFunc.shareInstance.getUserType() == 2{
// vc.dob.minimumDate = Calendar.current.date(byAdding: .year, value: -150, to: Date())
// vc.dob.maximumDate = Calendar.current.date(byAdding: .year, value: -16, to: Date())
// }else{
// vc.dob.minimumDate = Calendar.current.date(byAdding: .year, value: -16, to: Date())
// vc.dob.maximumDate = Calendar.current.date(byAdding: .year, value: -3, to: Date())
// }
enableDisableNextBtn(enable: false)
}
func checkChanges(name : String?){
guard let data = AuthFunc.shareInstance.userData else{return}
if let name {
if name.trimmingCharacters(in: .whitespaces).lowercased() != data.fullname?.lowercased() { // || gender == data.gender
enableDisableNextBtn(enable: true)
} else{
enableDisableNextBtn(enable: false)
}
}
}
private func enableDisableNextBtn(enable : Bool){
if enable{
vc.nextBtn.alpha = 1
vc.nextBtn.isEnabled = true
}else{
vc.nextBtn.alpha = 0.7
vc.nextBtn.isEnabled = false
}
}
func setUserData(){
guard let data = AuthFunc.shareInstance.userData else{return}
gender = 2 // static for now
vc.fullNameTF.text = data.fullname
vc.userNameLabel.text = data.username
vc.emailTF.text = data.email
if let date = data.birthdate{
let formattedDate = DateFormatterLib.dateMods(dateStr: date, dateCurrentFormat: .yyyy_MM_dd, dateReturnFormat: .yyyy_MM_dd, stringOrDate: .date).1
vc.dob.date = formattedDate ?? Date()
}
//set the first name as the name
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)
}
setGender()
}
private func addTapGesture(){
vc.boyView.addTapGesture {
self.boyBtnTapped()
}
vc.girlView.addTapGesture {
self.girlBtnTapped()
}
}
// MARK: - Update Profile API CALL
func updateUserData(){
let params: Parameters = [
"fullname": vc.fullNameTF.text!,
"email": vc.emailTF.text!,
"gender": gender, //2->boy 1-> girl
]
let headers : HTTPHeaders = ["Accept-Language" : AuthFunc.shareInstance.languageSelected == .english ? "English" : "Hindi",
"access-token" : AuthFunc.shareInstance.getAccessToken()]
Utilities.startProgressHUD(msg: "Updating")
NetworkManager.shareInstance.apiRequest(url: APIEndPoints.SideBarNav.update_profile, method: .post ,parameters: params,headers: headers) {(result : Result<BaseResponseModel<UserDataDM>, NetworkManager.APIError>) in
switch result{
case .success(let data):
switch data.success{
case 0: // some error
Utilities.dismissProgressHUD()
self.vc.toast(msg: data.message ?? "Unrecognised error" , time: 2)
case 1: // Success
Utilities.dismissProgressHUD()
self.vc.toast(msg: data.message ?? "Updated profile", time: 1.5) {
guard let data = data.data?.result else{return}
AuthFunc.shareInstance.userData = data
self.enableDisableNextBtn(enable: false)
// self.vc.navigationController?.popViewController(animated: true)
}
default:
Utilities.dismissProgressHUD()
self.vc.toast(msg: K.ConstantString.unRecognised , time: 1)
}
case .failure(let error):
Utilities.dismissProgressHUD()
self.vc.toast(msg: error.localizedDescription , time: 2)
}
}
}
// MARK: - Gender Handler
func boyBtnTapped() {
// Apply click effect animation
gender = 2
UIView.animate(withDuration: 0.1, animations: {
self.vc.boyView.transform = CGAffineTransform(scaleX: 0.9, y: 0.9)
}) { _ in
UIView.animate(withDuration: 0.1) {
self.vc.boyView.transform = .identity
self.setGender()
}
}
}
func girlBtnTapped() {
gender = 1
// Apply click effect animation
UIView.animate(withDuration: 0.1, animations: {
self.vc.girlView.transform = CGAffineTransform(scaleX: 0.9, y: 0.9)
}) { _ in
UIView.animate(withDuration: 0.1) {
self.vc.girlView.transform = .identity
self.setGender()
}
}
}
func setGender(){
let alphaComp = 0.6
switch gender{
case 2:
vc.boyView.backgroundColor = UIColor.white
vc.girlView.backgroundColor = UIColor.white.withAlphaComponent(alphaComp)
case 1:
vc.girlView.backgroundColor = UIColor.white
vc.boyView.backgroundColor = UIColor.white.withAlphaComponent(alphaComp)
default:
vc.girlView.backgroundColor = UIColor.white.withAlphaComponent(alphaComp)
vc.boyView.backgroundColor = UIColor.white.withAlphaComponent(alphaComp)
}
}
}

View File

@@ -27,6 +27,7 @@ class SideMenuVC: UIViewController {
@IBOutlet weak var faqBtn: UIButton!
@IBOutlet weak var wokaSupportBtn: UIButton!
@IBOutlet weak var profileBtn: UIButton!
@IBOutlet weak var myOrderBtn: UIButton!
@IBOutlet weak var addChildBtn: UIButton!
@IBOutlet weak var deactivateBtn: UIButton!
@@ -60,6 +61,9 @@ class SideMenuVC: UIViewController {
case wokaSupportBtn:
self.sideMenuController?.hideMenu()
NotificationCenter.default.post(name: .linkPush, object: nil, userInfo: ["type": LinkTypeEnum.support])
case profileBtn:
self.sideMenuController?.hideMenu()
NotificationCenter.default.post(name: .linkPush, object: nil, userInfo: ["type": LinkTypeEnum.profile])
default:
break

View File

@@ -48,6 +48,10 @@ class TabBarVC: UITabBarController {
let sb = UIStoryboard(name: K.StoryBoard.sideBarNav, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.SideBarNav.contactSupportVC) as! ContactSupportVC
self.navigationController?.pushViewController(vcPush, animated: true)
case .profile:
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
}

View File

@@ -88,6 +88,11 @@ class SideMenuVM{
vc.userName.text = (data.fullname == nil || data.fullname == "") ? "User" : data.fullname
case "3": // Guest
vc.userName.text = ""
vc.profileBtn.isHidden = true
vc.addChildBtn.isHidden = true
vc.deactivateBtn.isHidden = true
vc.myOrderBtn.isHidden = true
vc.logoutBtn.setTitle("Login/Register", for: .normal)
break
default:
break

View File

@@ -621,7 +621,7 @@
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemGreenColor">
<color red="0.20392156859999999" green="0.78039215689999997" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.20392156862745098" green="0.7803921568627451" blue="0.34901960784313724" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>