- solved issue of fullscreen for player. now transforming the view
- updated api for shop procuts, with lazy loading and proper structure - added loading indicator when user navigates to bottom indicator will be shown - Made shop product details view. - Added carousel with page indicator - added shadows to the images - added selection option for address - made address table dynamic - added pincode_serviceability_check_edd for checking the delivery date of the selected address.
This commit is contained in:
@@ -114,7 +114,7 @@
|
||||
52A6DCB22C4E73C800F63C51 /* ShopProductsVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A6DCB12C4E73C800F63C51 /* ShopProductsVC.swift */; };
|
||||
52A6DCB42C4E73F100F63C51 /* ShopProductsVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A6DCB32C4E73F100F63C51 /* ShopProductsVM.swift */; };
|
||||
52A6DCB62C4E748100F63C51 /* ShopSubCategoryDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A6DCB52C4E748100F63C51 /* ShopSubCategoryDM.swift */; };
|
||||
52A6DCB82C4E754800F63C51 /* ShopProductDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A6DCB72C4E754800F63C51 /* ShopProductDM.swift */; };
|
||||
52A6DCB82C4E754800F63C51 /* ShopProductsListingDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A6DCB72C4E754800F63C51 /* ShopProductsListingDM.swift */; };
|
||||
52A6DCBB2C4EA46400F63C51 /* ShopProductsCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 52A6DCBA2C4EA46400F63C51 /* ShopProductsCell.xib */; };
|
||||
52A6DCBC2C4EA46400F63C51 /* ShopProductsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A6DCB92C4EA46400F63C51 /* ShopProductsCell.swift */; };
|
||||
52A6DCBF2C4F8E7C00F63C51 /* Cart.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 52A6DCBE2C4F8E7C00F63C51 /* Cart.storyboard */; };
|
||||
@@ -299,6 +299,15 @@
|
||||
9CBE1B432C0F37B300CA6E61 /* DropDown.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CBE1B382C0F37B200CA6E61 /* DropDown.swift */; };
|
||||
9CBE1B442C0F37B300CA6E61 /* DropDown+Appearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CBE1B392C0F37B200CA6E61 /* DropDown+Appearance.swift */; };
|
||||
9CBE1B452C0F37B300CA6E61 /* DropDownCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CBE1B3A2C0F37B200CA6E61 /* DropDownCell.swift */; };
|
||||
9CDAEB032C53B97B00890C47 /* VersionTexts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CDAEB022C53B97B00890C47 /* VersionTexts.swift */; };
|
||||
9CDAEB052C53DB2900890C47 /* ProductDetailsVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CDAEB042C53DB2900890C47 /* ProductDetailsVC.swift */; };
|
||||
9CDAEB072C53E42900890C47 /* ProductDetailsVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CDAEB062C53E42900890C47 /* ProductDetailsVM.swift */; };
|
||||
9CDAEB0A2C53E9FF00890C47 /* ShopProductImageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CDAEB082C53E9FF00890C47 /* ShopProductImageCell.swift */; };
|
||||
9CDAEB0B2C53E9FF00890C47 /* ShopProductImageCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CDAEB092C53E9FF00890C47 /* ShopProductImageCell.xib */; };
|
||||
9CDAEB102C53F12800890C47 /* SwiftyInnerShadowLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CDAEB0C2C53F12800890C47 /* SwiftyInnerShadowLayer.swift */; };
|
||||
9CDAEB112C53F12800890C47 /* SwiftyInnerShadowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CDAEB0D2C53F12800890C47 /* SwiftyInnerShadowView.swift */; };
|
||||
9CDAEB122C53F12800890C47 /* UIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CDAEB0E2C53F12800890C47 /* UIView.swift */; };
|
||||
9CDAEB142C54132E00890C47 /* CheckEddDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CDAEB132C54132E00890C47 /* CheckEddDM.swift */; };
|
||||
9CDC343C2BDBBC6B00093089 /* SelectAgeVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CDC343B2BDBBC6B00093089 /* SelectAgeVC.swift */; };
|
||||
9CDCE1452BDB9B9A003FEF11 /* OnBoardMainSound.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 9CDCE1442BDB9B9A003FEF11 /* OnBoardMainSound.m4a */; };
|
||||
/* End PBXBuildFile section */
|
||||
@@ -436,7 +445,7 @@
|
||||
52A6DCB12C4E73C800F63C51 /* ShopProductsVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShopProductsVC.swift; sourceTree = "<group>"; };
|
||||
52A6DCB32C4E73F100F63C51 /* ShopProductsVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShopProductsVM.swift; sourceTree = "<group>"; };
|
||||
52A6DCB52C4E748100F63C51 /* ShopSubCategoryDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShopSubCategoryDM.swift; sourceTree = "<group>"; };
|
||||
52A6DCB72C4E754800F63C51 /* ShopProductDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShopProductDM.swift; sourceTree = "<group>"; };
|
||||
52A6DCB72C4E754800F63C51 /* ShopProductsListingDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShopProductsListingDM.swift; sourceTree = "<group>"; };
|
||||
52A6DCB92C4EA46400F63C51 /* ShopProductsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShopProductsCell.swift; sourceTree = "<group>"; };
|
||||
52A6DCBA2C4EA46400F63C51 /* ShopProductsCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ShopProductsCell.xib; sourceTree = "<group>"; };
|
||||
52A6DCBE2C4F8E7C00F63C51 /* Cart.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Cart.storyboard; sourceTree = "<group>"; };
|
||||
@@ -615,6 +624,15 @@
|
||||
9CBE1B392C0F37B200CA6E61 /* DropDown+Appearance.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "DropDown+Appearance.swift"; sourceTree = "<group>"; };
|
||||
9CBE1B3A2C0F37B200CA6E61 /* DropDownCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DropDownCell.swift; sourceTree = "<group>"; };
|
||||
9CBE1B3C2C0F37B200CA6E61 /* DropDown.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DropDown.h; sourceTree = "<group>"; };
|
||||
9CDAEB022C53B97B00890C47 /* VersionTexts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VersionTexts.swift; sourceTree = "<group>"; };
|
||||
9CDAEB042C53DB2900890C47 /* ProductDetailsVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductDetailsVC.swift; sourceTree = "<group>"; };
|
||||
9CDAEB062C53E42900890C47 /* ProductDetailsVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductDetailsVM.swift; sourceTree = "<group>"; };
|
||||
9CDAEB082C53E9FF00890C47 /* ShopProductImageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShopProductImageCell.swift; sourceTree = "<group>"; };
|
||||
9CDAEB092C53E9FF00890C47 /* ShopProductImageCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ShopProductImageCell.xib; sourceTree = "<group>"; };
|
||||
9CDAEB0C2C53F12800890C47 /* SwiftyInnerShadowLayer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftyInnerShadowLayer.swift; sourceTree = "<group>"; };
|
||||
9CDAEB0D2C53F12800890C47 /* SwiftyInnerShadowView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftyInnerShadowView.swift; sourceTree = "<group>"; };
|
||||
9CDAEB0E2C53F12800890C47 /* UIView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIView.swift; sourceTree = "<group>"; };
|
||||
9CDAEB132C54132E00890C47 /* CheckEddDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckEddDM.swift; sourceTree = "<group>"; };
|
||||
9CDC343B2BDBBC6B00093089 /* SelectAgeVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectAgeVC.swift; sourceTree = "<group>"; };
|
||||
9CDCE1412BDB94BA003FEF11 /* hi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hi; path = hi.lproj/Main.strings; sourceTree = "<group>"; };
|
||||
9CDCE1422BDB94BD003FEF11 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Main.strings; sourceTree = "<group>"; };
|
||||
@@ -764,32 +782,32 @@
|
||||
523ED25C2BDA2BC700CFED02 /* WOKA */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
52A6DCBD2C4F8E7300F63C51 /* Cart */,
|
||||
52A6DCAF2C4E621800F63C51 /* BadgedBarButtonItem.swift */,
|
||||
52A6DC942C4E385500F63C51 /* Shop */,
|
||||
9CB3D0832C37BA470062869D /* Karaoke */,
|
||||
526A436D2C36A96A00AE148F /* Games */,
|
||||
52BFB52B2C33DA9700BAAE15 /* Audio Books */,
|
||||
52DAC6462C21761700E2F85B /* WebSeries */,
|
||||
9C834ED92C1C20EC00B29A9C /* WOKA.entitlements */,
|
||||
523ED26B2BDA2BC900CFED02 /* Info.plist */,
|
||||
9C9BEEC62BEE1BBF004ECC2F /* CollectionViewCenteredFlowLayout.swift */,
|
||||
5259541E2BE8E93500191286 /* Config.xcconfig */,
|
||||
5259542C2BEA392A00191286 /* Alerts */,
|
||||
523ED2932BDA3D0100CFED02 /* Assets */,
|
||||
52BFB52B2C33DA9700BAAE15 /* Audio Books */,
|
||||
9C56E83E2BDBE4FB00E4CA14 /* Authentication */,
|
||||
52A6DCAF2C4E621800F63C51 /* BadgedBarButtonItem.swift */,
|
||||
52A6DCBD2C4F8E7300F63C51 /* Cart */,
|
||||
9C9BEEC62BEE1BBF004ECC2F /* CollectionViewCenteredFlowLayout.swift */,
|
||||
5259541E2BE8E93500191286 /* Config.xcconfig */,
|
||||
52C8B0552BDA57CE003B51D0 /* Constants K */,
|
||||
52C6E01F2BE3ADD800E22D59 /* Default Enum */,
|
||||
526A436D2C36A96A00AE148F /* Games */,
|
||||
52C8B0512BDA4B51003B51D0 /* Helpers */,
|
||||
9CBCB2A62BE5104F007D7934 /* Home */,
|
||||
523ED26B2BDA2BC900CFED02 /* Info.plist */,
|
||||
9CB3D0832C37BA470062869D /* Karaoke */,
|
||||
523ED2682BDA2BC900CFED02 /* LaunchScreen.storyboard */,
|
||||
9C27E15E2BDB6E4F00EC1DA9 /* Localized Module */,
|
||||
9C27E1612BDB6F0F00EC1DA9 /* Main */,
|
||||
525954152BE8CAC900191286 /* Network Adapter */,
|
||||
523ED28E2BDA372C00CFED02 /* OnBoarding Module */,
|
||||
52A6DC942C4E385500F63C51 /* Shop */,
|
||||
522A93142C0DE8770098FE49 /* SideBarNav */,
|
||||
525327D72BFCC30400F64283 /* TabBar & SideMenu */,
|
||||
9C535DC82C00C34000DA6DCD /* Theme */,
|
||||
52DAC6462C21761700E2F85B /* WebSeries */,
|
||||
9C834ED92C1C20EC00B29A9C /* WOKA.entitlements */,
|
||||
);
|
||||
path = WOKA;
|
||||
sourceTree = "<group>";
|
||||
@@ -1072,6 +1090,7 @@
|
||||
52A6DC9B2C4E38E000F63C51 /* ShopListingVC.swift */,
|
||||
52A6DCAB2C4E5A1100F63C51 /* ShopCategoryVC.swift */,
|
||||
52A6DCB12C4E73C800F63C51 /* ShopProductsVC.swift */,
|
||||
9CDAEB042C53DB2900890C47 /* ProductDetailsVC.swift */,
|
||||
);
|
||||
path = Controller;
|
||||
sourceTree = "<group>";
|
||||
@@ -1082,6 +1101,7 @@
|
||||
52A6DCA12C4E3B7500F63C51 /* ShopListingVM.swift */,
|
||||
52A6DCAD2C4E5A3900F63C51 /* ShopCategoryVM.swift */,
|
||||
52A6DCB32C4E73F100F63C51 /* ShopProductsVM.swift */,
|
||||
9CDAEB062C53E42900890C47 /* ProductDetailsVM.swift */,
|
||||
);
|
||||
path = ViewModel;
|
||||
sourceTree = "<group>";
|
||||
@@ -1093,6 +1113,8 @@
|
||||
52A6DC9E2C4E3AA600F63C51 /* ShopListingCell.xib */,
|
||||
52A6DCB92C4EA46400F63C51 /* ShopProductsCell.swift */,
|
||||
52A6DCBA2C4EA46400F63C51 /* ShopProductsCell.xib */,
|
||||
9CDAEB082C53E9FF00890C47 /* ShopProductImageCell.swift */,
|
||||
9CDAEB092C53E9FF00890C47 /* ShopProductImageCell.xib */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
@@ -1103,7 +1125,7 @@
|
||||
52A6DCA32C4E48AF00F63C51 /* ShopSuperCategoryDM.swift */,
|
||||
52A6DCA92C4E59BD00F63C51 /* ShopCategoryDM.swift */,
|
||||
52A6DCB52C4E748100F63C51 /* ShopSubCategoryDM.swift */,
|
||||
52A6DCB72C4E754800F63C51 /* ShopProductDM.swift */,
|
||||
52A6DCB72C4E754800F63C51 /* ShopProductsListingDM.swift */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
@@ -1162,6 +1184,7 @@
|
||||
525861D92C4FE71100C33C79 /* CouponListDM.swift */,
|
||||
525861DF2C4FF16700C33C79 /* CouponApplyDM.swift */,
|
||||
52BBFCB52C52764B00F7D0D1 /* AddressListDM.swift */,
|
||||
9CDAEB132C54132E00890C47 /* CheckEddDM.swift */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
@@ -1235,6 +1258,7 @@
|
||||
52C8B0512BDA4B51003B51D0 /* Helpers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9CDAEB0F2C53F12800890C47 /* Shadows */,
|
||||
9C834EDA2C1C26C000B29A9C /* HTML */,
|
||||
527AC6FF2C182D1700434FB7 /* Timer */,
|
||||
9CBE1B3E2C0F37B200CA6E61 /* DropDown */,
|
||||
@@ -1257,6 +1281,7 @@
|
||||
9C7939142C0F23AA00F5D6E6 /* NsNotificationExtension.swift */,
|
||||
9CB4C5A82C118EF300737C00 /* NavBarColor.swift */,
|
||||
525861CF2C4F9E3200C33C79 /* SwipeTableViewFont.swift */,
|
||||
9CDAEB022C53B97B00890C47 /* VersionTexts.swift */,
|
||||
);
|
||||
path = Helpers;
|
||||
sourceTree = "<group>";
|
||||
@@ -1675,6 +1700,16 @@
|
||||
path = DropDown;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9CDAEB0F2C53F12800890C47 /* Shadows */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9CDAEB0C2C53F12800890C47 /* SwiftyInnerShadowLayer.swift */,
|
||||
9CDAEB0D2C53F12800890C47 /* SwiftyInnerShadowView.swift */,
|
||||
9CDAEB0E2C53F12800890C47 /* UIView.swift */,
|
||||
);
|
||||
path = Shadows;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9CDCE1432BDB9B64003FEF11 /* Sounds */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -1822,6 +1857,7 @@
|
||||
52A6DCBF2C4F8E7C00F63C51 /* Cart.storyboard in Resources */,
|
||||
52C1A4E82C05C95D007BAA50 /* Theme.storyboard in Resources */,
|
||||
526A436F2C36A97400AE148F /* Games.storyboard in Resources */,
|
||||
9CDAEB0B2C53E9FF00890C47 /* ShopProductImageCell.xib in Resources */,
|
||||
522D65652C1ACE9C0021E505 /* UserNotificationCell.xib in Resources */,
|
||||
9C535DC52C00BF2400DA6DCD /* HomeExploreCell.xib in Resources */,
|
||||
9CBE1B422C0F37B300CA6E61 /* DropDownCell.xib in Resources */,
|
||||
@@ -1943,6 +1979,7 @@
|
||||
5259545C2BEBB80400191286 /* AvatarDM.swift in Sources */,
|
||||
52C8B06C2BDA6E87003B51D0 /* LocalizedString.swift in Sources */,
|
||||
52A6DCC72C4F8FD000F63C51 /* CartListVM.swift in Sources */,
|
||||
9CDAEB112C53F12800890C47 /* SwiftyInnerShadowView.swift in Sources */,
|
||||
525953D42BE8B2DF00191286 /* UIApplication.swift in Sources */,
|
||||
52C8EC802C358E75002DC35C /* AudioBookDetailsVC.swift in Sources */,
|
||||
52CC38C32BDF812F00B74C3E /* LocalisedElements.swift in Sources */,
|
||||
@@ -1960,12 +1997,15 @@
|
||||
52C8EC7A2C353653002DC35C /* ContinueAudioListDM.swift in Sources */,
|
||||
52B8D4DF2C04A25E00ED65F3 /* StatusBar.swift in Sources */,
|
||||
5259541D2BE8D94400191286 /* QueueHelper.swift in Sources */,
|
||||
9CDAEB142C54132E00890C47 /* CheckEddDM.swift in Sources */,
|
||||
525954232BE8F00400191286 /* BaseResponseModel.swift in Sources */,
|
||||
9C3E14472C517E8F00D06C10 /* TopViewEnum.swift in Sources */,
|
||||
525861E02C4FF16700C33C79 /* CouponApplyDM.swift in Sources */,
|
||||
52A6DCB42C4E73F100F63C51 /* ShopProductsVM.swift in Sources */,
|
||||
9C27E1692BDB76F200EC1DA9 /* OnBoardVM.swift in Sources */,
|
||||
9CDAEB052C53DB2900890C47 /* ProductDetailsVC.swift in Sources */,
|
||||
9C7939172C0F23E900F5D6E6 /* LinkTypeEnum.swift in Sources */,
|
||||
9CDAEB122C53F12800890C47 /* UIView.swift in Sources */,
|
||||
523ED2622BDA2BC700CFED02 /* SplashVC.swift in Sources */,
|
||||
9CDC343C2BDBBC6B00093089 /* SelectAgeVC.swift in Sources */,
|
||||
52A6DCAC2C4E5A1100F63C51 /* ShopCategoryVC.swift in Sources */,
|
||||
@@ -1999,6 +2039,7 @@
|
||||
9C27E1632BDB6F1900EC1DA9 /* AuthFunc.swift in Sources */,
|
||||
9C0A85412BEE35670093783D /* ResetPassUserNameVM.swift in Sources */,
|
||||
52C6E0292BE3B52500E22D59 /* SelectAvatarVM.swift in Sources */,
|
||||
9CDAEB032C53B97B00890C47 /* VersionTexts.swift in Sources */,
|
||||
52C8B0592BDA57FA003B51D0 /* StaticFilesString.swift in Sources */,
|
||||
52C8B05D2BDA5AA7003B51D0 /* ApplyGradrient.swift in Sources */,
|
||||
52C6E01B2BE383C000E22D59 /* YourIntrestCell.swift in Sources */,
|
||||
@@ -2037,6 +2078,7 @@
|
||||
9CBE1B442C0F37B300CA6E61 /* DropDown+Appearance.swift in Sources */,
|
||||
9C27E16B2BDB774D00EC1DA9 /* CarouselData.swift in Sources */,
|
||||
525954212BE8EB7900191286 /* APIEndPoints.swift in Sources */,
|
||||
9CDAEB072C53E42900890C47 /* ProductDetailsVM.swift in Sources */,
|
||||
5259545A2BEB67D200191286 /* DateFormatterLib.swift in Sources */,
|
||||
523ED2602BDA2BC700CFED02 /* SceneDelegate.swift in Sources */,
|
||||
9C0A853F2BEE35340093783D /* ForgotPassDM.swift in Sources */,
|
||||
@@ -2068,6 +2110,7 @@
|
||||
52C6E01E2BE3847F00E22D59 /* BorderView.swift in Sources */,
|
||||
52FDBA7D2BFF481A009D7AC7 /* ThemeOneVM.swift in Sources */,
|
||||
9C7939192C0F345000F5D6E6 /* ContactSupportVC.swift in Sources */,
|
||||
9CDAEB0A2C53E9FF00890C47 /* ShopProductImageCell.swift in Sources */,
|
||||
9CBE1B432C0F37B300CA6E61 /* DropDown.swift in Sources */,
|
||||
52A6DC9C2C4E38E000F63C51 /* ShopListingVC.swift in Sources */,
|
||||
52C8B0742BDA7626003B51D0 /* OnBoardVC.swift in Sources */,
|
||||
@@ -2126,6 +2169,7 @@
|
||||
52E214C72C2AD47F00BC2D29 /* EpisodeDetailsVC.swift in Sources */,
|
||||
52D774F12BDFC53B001D87DE /* StringSubScript.swift in Sources */,
|
||||
9CBE1B3F2C0F37B300CA6E61 /* DPDConstants.swift in Sources */,
|
||||
9CDAEB102C53F12800890C47 /* SwiftyInnerShadowLayer.swift in Sources */,
|
||||
52A6DCA42C4E48AF00F63C51 /* ShopSuperCategoryDM.swift in Sources */,
|
||||
52B8D4DA2C04A25E00ED65F3 /* Preferences.swift in Sources */,
|
||||
52FB2D8F2BDF898F0009B0C7 /* TextFieldPadding.swift in Sources */,
|
||||
@@ -2150,7 +2194,7 @@
|
||||
52C6E0212BE3ADE300E22D59 /* GenderEnum.swift in Sources */,
|
||||
9CA7C6C02C1093E500D73742 /* ProfileVC.swift in Sources */,
|
||||
525953D12BE8B2B200191286 /* LLSpinner.swift in Sources */,
|
||||
52A6DCB82C4E754800F63C51 /* ShopProductDM.swift in Sources */,
|
||||
52A6DCB82C4E754800F63C51 /* ShopProductsListingDM.swift in Sources */,
|
||||
52C6E0272BE3B46A00E22D59 /* SelectAvatarCell.swift in Sources */,
|
||||
9C535DB82C0089B400DA6DCD /* ViewButtonAnimation.swift in Sources */,
|
||||
);
|
||||
@@ -2377,11 +2421,11 @@
|
||||
INFOPLIST_FILE = WOKA/Info.plist;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = WOKA;
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.entertainment";
|
||||
INFOPLIST_KEY_NSMicrophoneUsageDescription = "Give Permissions for Karaoke";
|
||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen.storyboard;
|
||||
INFOPLIST_KEY_UIMainStoryboardFile = Main;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
|
||||
INFOPLIST_KEY_UIUserInterfaceStyle = Light;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
@@ -2416,11 +2460,11 @@
|
||||
INFOPLIST_FILE = WOKA/Info.plist;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = WOKA;
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.entertainment";
|
||||
INFOPLIST_KEY_NSMicrophoneUsageDescription = "Give Permissions for Karaoke";
|
||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen.storyboard;
|
||||
INFOPLIST_KEY_UIMainStoryboardFile = Main;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
|
||||
INFOPLIST_KEY_UIUserInterfaceStyle = Light;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
|
||||
@@ -115,6 +115,9 @@ class AudioBookDetailsVC : UIViewController{
|
||||
if isLiked{
|
||||
LikeFavCommonFunc.shareInstance.unlikePost(postID: showID, postType: postType, vc: self) { isDone in
|
||||
self.audioData?.isLiked = false
|
||||
if self.audioData?.likesCount != nil{
|
||||
self.audioData?.likesCount! -= 1
|
||||
}
|
||||
K.GVar.reloadMyList = true
|
||||
self.delegate?.updateAudioRows(id: showID, type: .liked, isFav: nil, isLike: false)
|
||||
self.initView()
|
||||
@@ -122,6 +125,9 @@ class AudioBookDetailsVC : UIViewController{
|
||||
}else{
|
||||
LikeFavCommonFunc.shareInstance.likePost(postID: showID, postType: postType, vc: self) { isDone in
|
||||
self.audioData?.isLiked = true
|
||||
if self.audioData?.likesCount != nil{
|
||||
self.audioData?.likesCount! += 1
|
||||
}
|
||||
K.GVar.reloadMyList = true
|
||||
self.delegate?.updateAudioRows(id: showID, type: .liked, isFav: nil, isLike: true)
|
||||
self.initView()
|
||||
@@ -135,6 +141,9 @@ class AudioBookDetailsVC : UIViewController{
|
||||
if isLiked{
|
||||
LikeFavCommonFunc.shareInstance.unlikePost(postID: showID, postType: postType, vc: self) { isDone in
|
||||
self.continueAudioData?.isLiked = false
|
||||
if self.audioData?.likesCount != nil{
|
||||
self.audioData?.likesCount! -= 1
|
||||
}
|
||||
K.GVar.reloadMyList = true
|
||||
self.delegate?.updateAudioRows(id: showID, type: .liked, isFav: nil, isLike: false)
|
||||
self.initView()
|
||||
@@ -142,6 +151,9 @@ class AudioBookDetailsVC : UIViewController{
|
||||
}else{
|
||||
LikeFavCommonFunc.shareInstance.likePost(postID: showID, postType: postType, vc: self) { isDone in
|
||||
self.continueAudioData?.isLiked = true
|
||||
if self.audioData?.likesCount != nil{
|
||||
self.audioData?.likesCount! += 1
|
||||
}
|
||||
K.GVar.reloadMyList = true
|
||||
self.delegate?.updateAudioRows(id: showID, type: .liked, isFav: nil, isLike: true)
|
||||
self.initView()
|
||||
|
||||
@@ -109,11 +109,21 @@ extension AudioBookHomeVC : ReloadAudioBooksFavLike{
|
||||
if let isLike{
|
||||
if let continueDataIndex = vm.continueWatchingData.firstIndex(where:{$0.id == id}) {
|
||||
vm.continueWatchingData[continueDataIndex].isLiked = isLike
|
||||
if isLike{
|
||||
vm.continueWatchingData[continueDataIndex].likesCount! += 1
|
||||
}else{
|
||||
vm.continueWatchingData[continueDataIndex].likesCount! -= 1
|
||||
}
|
||||
continueWatchingCV.reloadItems(at: [IndexPath(row: continueDataIndex, section: 0)])
|
||||
}
|
||||
|
||||
if let audioListDataIndex = vm.audioListData.firstIndex(where:{$0.id == id}) {
|
||||
vm.audioListData[audioListDataIndex].isLiked = isLike
|
||||
if isLike{
|
||||
vm.audioListData[audioListDataIndex].likesCount! += 1
|
||||
}else{
|
||||
vm.audioListData[audioListDataIndex].likesCount! -= 1
|
||||
}
|
||||
audioListingTableView.reloadRows(at: [IndexPath(row: audioListDataIndex, section: 0)],with: .none)
|
||||
K.GVar.reloadMyList = true
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<device id="retina6_5" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
|
||||
@@ -23,15 +23,15 @@
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="CartListVC" id="Y6W-OH-hqX" customClass="CartListVC" customModule="WOKA" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="5EZ-qb-Rvc">
|
||||
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="ps3-jx-FQy">
|
||||
<rect key="frame" x="0.0" y="59" width="393" height="635.66666666666663"/>
|
||||
<rect key="frame" x="0.0" y="44" width="414" height="694.66666666666663"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tableView>
|
||||
<stackView hidden="YES" opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="js7-GH-et3">
|
||||
<rect key="frame" x="71.666666666666671" y="276.66666666666669" width="249.66666666666663" height="200"/>
|
||||
<rect key="frame" x="82.333333333333329" y="291.33333333333331" width="249.66666666666669" height="200"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="SupportGirlImage" translatesAutoresizingMaskIntoConstraints="NO" id="tLb-Z0-okz">
|
||||
<rect key="frame" x="0.0" y="0.0" width="249.66666666666666" height="166"/>
|
||||
@@ -45,17 +45,17 @@
|
||||
</subviews>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="13" translatesAutoresizingMaskIntoConstraints="NO" id="82Y-4J-aTR">
|
||||
<rect key="frame" x="15" y="709.66666666666663" width="363" height="98.333333333333371"/>
|
||||
<rect key="frame" x="15" y="753.66666666666663" width="384" height="98.333333333333371"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="e4l-pV-7sR">
|
||||
<rect key="frame" x="0.0" y="0.0" width="363" height="0.66666666666666663"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="384" height="0.66666666666666663"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="0.69999999999999996" id="lSI-3U-QLx"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" translatesAutoresizingMaskIntoConstraints="NO" id="QuL-PJ-Oz3">
|
||||
<rect key="frame" x="0.0" y="13.666666666666744" width="363" height="21.666666666666671"/>
|
||||
<rect key="frame" x="0.0" y="13.666666666666744" width="384" height="21.666666666666671"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Total:" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DO4-PA-00W" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="48" height="21.666666666666668"/>
|
||||
@@ -64,7 +64,7 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rs. 0" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0A4-Z2-5iu" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="322" y="0.0" width="41" height="21.666666666666668"/>
|
||||
<rect key="frame" x="343" y="0.0" width="41" height="21.666666666666668"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -72,7 +72,7 @@
|
||||
</subviews>
|
||||
</stackView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rBM-1y-r0e" customClass="LocalisedElementsButton" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="48.333333333333371" width="363" height="50"/>
|
||||
<rect key="frame" x="0.0" y="48.333333333333371" width="384" height="50"/>
|
||||
<color key="backgroundColor" red="0.035294117647058823" green="0.0" blue="0.36470588235294116" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="50" id="n6f-g2-3kT">
|
||||
@@ -131,33 +131,33 @@
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="CartPaymentOptionsVC" id="lm3-5q-Mwn" customClass="CartPaymentOptionsVC" customModule="WOKA" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="Qtr-gk-eud">
|
||||
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Y68-eb-iI3">
|
||||
<rect key="frame" x="0.0" y="74" width="393" height="744"/>
|
||||
<rect key="frame" x="0.0" y="59" width="414" height="803"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="4FL-Qu-GXb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="393" height="364.33333333333331"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="364.33333333333331"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Order Summary" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fbh-Ve-yLY" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="5" y="5" width="383" height="24"/>
|
||||
<rect key="frame" x="5" y="5" width="404" height="24"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="20"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="qGY-nv-azT">
|
||||
<rect key="frame" x="5" y="39" width="383" height="100"/>
|
||||
<rect key="frame" x="5" y="39" width="404" height="100"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="100" id="cQ3-vj-QS5"/>
|
||||
</constraints>
|
||||
</tableView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="ZuF-hT-QwS">
|
||||
<rect key="frame" x="5" y="149" width="383" height="50"/>
|
||||
<rect key="frame" x="5" y="149" width="404" height="50"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Enter coupon code" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="0cZ-tT-3PH" customClass="TextFieldShadow" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="5" y="0.0" width="273" height="50"/>
|
||||
<rect key="frame" x="5" y="0.0" width="294" height="50"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<color key="tintColor" name="TextDarkBlue"/>
|
||||
<constraints>
|
||||
@@ -176,7 +176,7 @@
|
||||
</userDefinedRuntimeAttributes>
|
||||
</textField>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hLf-a9-uIi">
|
||||
<rect key="frame" x="288" y="0.0" width="90" height="50"/>
|
||||
<rect key="frame" x="309" y="0.0" width="90" height="50"/>
|
||||
<color key="backgroundColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="90" id="AF1-MJ-EsE"/>
|
||||
@@ -209,14 +209,14 @@
|
||||
<edgeInsets key="layoutMargins" top="0.0" left="5" bottom="0.0" right="5"/>
|
||||
</stackView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0M5-Sk-NNP">
|
||||
<rect key="frame" x="5" y="209" width="383" height="0.66666666666665719"/>
|
||||
<rect key="frame" x="5" y="209" width="404" height="0.66666666666665719"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="0.69999999999999996" id="euT-bu-DWE"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Hjo-i3-vzd">
|
||||
<rect key="frame" x="5" y="219.66666666666669" width="383" height="34.333333333333343"/>
|
||||
<rect key="frame" x="5" y="219.66666666666669" width="404" height="34.333333333333343"/>
|
||||
<color key="tintColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="All Offers & Coupons" image="chevron.forward.circle.fill" catalog="system"/>
|
||||
@@ -226,30 +226,30 @@
|
||||
</connections>
|
||||
</button>
|
||||
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" No Coupon Found!" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yYe-w7-xHF" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="5" y="259" width="383" height="0.0"/>
|
||||
<rect key="frame" x="5" y="259" width="404" height="0.0"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="16"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<tableView hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="kB1-D9-Jpc">
|
||||
<rect key="frame" x="5" y="259" width="383" height="0.0"/>
|
||||
<rect key="frame" x="5" y="259" width="404" height="0.0"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" id="Uhk-ez-kna"/>
|
||||
</constraints>
|
||||
</tableView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PfV-Yj-8cg">
|
||||
<rect key="frame" x="5" y="264" width="383" height="0.66666666666668561"/>
|
||||
<rect key="frame" x="5" y="264" width="404" height="0.66666666666668561"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="0.69999999999999996" id="4xH-CV-oza"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<stackView hidden="YES" opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="IIC-eN-1kV">
|
||||
<rect key="frame" x="5" y="269.66666666666669" width="383" height="40.666666666666686"/>
|
||||
<rect key="frame" x="5" y="269.66666666666669" width="404" height="40.666666666666686"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" translatesAutoresizingMaskIntoConstraints="NO" id="0fF-q8-366">
|
||||
<rect key="frame" x="0.0" y="0.0" width="383" height="0.0"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="404" height="0.0"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Subtotal: " textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="X02-Xy-T6S" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="82" height="0.0"/>
|
||||
@@ -258,7 +258,7 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rs. 0" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VJO-dL-zw7" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="342" y="0.0" width="41" height="0.0"/>
|
||||
<rect key="frame" x="363" y="0.0" width="41" height="0.0"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -266,7 +266,7 @@
|
||||
</subviews>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" translatesAutoresizingMaskIntoConstraints="NO" id="ozO-f8-8kT">
|
||||
<rect key="frame" x="0.0" y="20" width="383" height="0.0"/>
|
||||
<rect key="frame" x="0.0" y="20" width="404" height="0.0"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Discount: " textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SjJ-9G-tNV" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="84" height="0.0"/>
|
||||
@@ -275,7 +275,7 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rs. 0" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Aru-WM-a5c" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="342" y="0.0" width="41" height="0.0"/>
|
||||
<rect key="frame" x="363" y="0.0" width="41" height="0.0"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -283,7 +283,7 @@
|
||||
</subviews>
|
||||
</stackView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="VUT-AU-unP">
|
||||
<rect key="frame" x="0.0" y="40" width="383" height="0.6666666666666643"/>
|
||||
<rect key="frame" x="0.0" y="40" width="404" height="0.6666666666666643"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="0.69999999999999996" id="JTK-Tg-kDT"/>
|
||||
@@ -292,10 +292,10 @@
|
||||
</subviews>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="13" translatesAutoresizingMaskIntoConstraints="NO" id="qF1-U6-f3P">
|
||||
<rect key="frame" x="5" y="274.66666666666669" width="383" height="84.666666666666686"/>
|
||||
<rect key="frame" x="5" y="274.66666666666669" width="404" height="84.666666666666686"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" translatesAutoresizingMaskIntoConstraints="NO" id="YSF-eO-Ree">
|
||||
<rect key="frame" x="0.0" y="0.0" width="383" height="21.666666666666668"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="404" height="21.666666666666668"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Total Amount: " textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mDO-yI-336" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="122" height="21.666666666666668"/>
|
||||
@@ -304,7 +304,7 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rs. 0" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lH2-35-Ttu" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="342" y="0.0" width="41" height="21.666666666666668"/>
|
||||
<rect key="frame" x="363" y="0.0" width="41" height="21.666666666666668"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -312,7 +312,7 @@
|
||||
</subviews>
|
||||
</stackView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rp4-qX-3OH" customClass="LocalisedElementsButton" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="34.666666666666629" width="383" height="50"/>
|
||||
<rect key="frame" x="0.0" y="34.666666666666629" width="404" height="50"/>
|
||||
<color key="backgroundColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="50" id="UFU-ci-N8q">
|
||||
@@ -390,25 +390,25 @@
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="AddressListVC" id="e74-xp-vgC" customClass="AddressListVC" customModule="WOKA" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="Qtr-Tw-ga2">
|
||||
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="u8h-Ky-5D7">
|
||||
<rect key="frame" x="10" y="64" width="373" height="749"/>
|
||||
<rect key="frame" x="10" y="49" width="394" height="808"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="o9Q-Ev-529">
|
||||
<rect key="frame" x="7" y="7" width="359" height="735"/>
|
||||
<rect key="frame" x="7" y="7" width="380" height="794"/>
|
||||
<subviews>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="hwr-Ev-IwN">
|
||||
<rect key="frame" x="10" y="10" width="339" height="590"/>
|
||||
<rect key="frame" x="10" y="10" width="360" height="649"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
</tableView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="uW6-Km-RZg">
|
||||
<rect key="frame" x="10" y="615" width="339" height="110"/>
|
||||
<stackView opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="uW6-Km-RZg">
|
||||
<rect key="frame" x="10" y="674" width="360" height="110"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yKt-QH-gCB" customClass="LocalisedElementsButton" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="339" height="50"/>
|
||||
<color key="backgroundColor" systemColor="systemOrangeColor"/>
|
||||
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yKt-QH-gCB" customClass="LocalisedElementsButton" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="360" height="50"/>
|
||||
<color key="backgroundColor" systemColor="systemGreenColor"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="50" id="E9r-k9-Fq8"/>
|
||||
</constraints>
|
||||
@@ -418,18 +418,13 @@
|
||||
<state key="normal" title="Use Selected Address">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="25"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="btnTapped:" destination="e74-xp-vgC" eventType="touchUpInside" id="5vZ-BG-eI8"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2Fy-uW-HrA" customClass="LocalisedElementsButton" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="60" width="339" height="50"/>
|
||||
<color key="backgroundColor" systemColor="systemOrangeColor"/>
|
||||
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2Fy-uW-HrA" customClass="LocalisedElementsButton" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="60" width="360" height="50"/>
|
||||
<color key="backgroundColor" systemColor="systemGreenColor"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="50" id="1EF-fs-4m9"/>
|
||||
</constraints>
|
||||
@@ -439,11 +434,6 @@
|
||||
<state key="normal" title="Add New Address">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="25"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="btnTapped:" destination="e74-xp-vgC" eventType="touchUpInside" id="go2-GU-591"/>
|
||||
</connections>
|
||||
@@ -495,7 +485,7 @@
|
||||
<outlet property="addNewAddressBtn" destination="2Fy-uW-HrA" id="PaR-kg-dCQ"/>
|
||||
<outlet property="innerView" destination="o9Q-Ev-529" id="yRK-FN-AyR"/>
|
||||
<outlet property="tableView" destination="hwr-Ev-IwN" id="0H0-wg-Nf0"/>
|
||||
<outlet property="useSelectedAddBtn" destination="yKt-QH-gCB" id="por-Fi-tcH"/>
|
||||
<outlet property="useSelectedAddBtn" destination="yKt-QH-gCB" id="ZXu-Tn-XLT"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="x5u-g1-Lhg" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
|
||||
@@ -505,7 +495,7 @@
|
||||
</scenes>
|
||||
<designables>
|
||||
<designable name="0cZ-tT-3PH">
|
||||
<size key="intrinsicContentSize" width="184.33333333333334" height="21"/>
|
||||
<size key="intrinsicContentSize" width="134.33333333333334" height="21"/>
|
||||
</designable>
|
||||
</designables>
|
||||
<resources>
|
||||
@@ -520,8 +510,5 @@
|
||||
<systemColor name="systemGreenColor">
|
||||
<color red="0.20392156862745098" green="0.7803921568627451" blue="0.34901960784313724" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
<systemColor name="systemOrangeColor">
|
||||
<color red="1" green="0.58431372549019611" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -25,6 +25,10 @@ class AddressListVC: UIViewController {
|
||||
navigationController?.navigationBar.shadowImage = UIImage()
|
||||
}
|
||||
|
||||
override func viewDidLayoutSubviews() {
|
||||
vm.addBtnGradient()
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
navigationController?.setNavigationBarHidden(false, animated: animated)
|
||||
@@ -64,4 +68,18 @@ extension AddressListVC : TableViewSRC{
|
||||
cell.setData(data: data)
|
||||
return cell
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
for index in vm.addressData.indices {
|
||||
vm.addressData[index].isDefault = false
|
||||
}
|
||||
if vm.addressData[indexPath.row].eddDate == nil || vm.addressData[indexPath.row].eddDate == ""{
|
||||
if let pincode = vm.addressData[indexPath.row].pincode, let id = vm.addressData[indexPath.row].id{
|
||||
vm.checkEstimatedDeliveryData(pinCode: pincode, id: id)
|
||||
}
|
||||
}
|
||||
|
||||
vm.addressData[indexPath.row].isDefault = true
|
||||
tableView.reloadData()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,9 @@ struct AddressListDM: Codable {
|
||||
let addressName, addressType, address, city: String?
|
||||
let state, pincode, country, phoneNo: String?
|
||||
let email: String?
|
||||
|
||||
var isDefault : Bool? = false
|
||||
var eddDate : String? = nil
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case id
|
||||
case addressName = "address_name"
|
||||
|
||||
27
WOKA/Cart/Model/CheckEddDM.swift
Normal file
27
WOKA/Cart/Model/CheckEddDM.swift
Normal file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// CheckEddDM.swift
|
||||
// WOKA
|
||||
//
|
||||
// Created by Bilal on 26/07/2024.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
// MARK: - CheckEddDM
|
||||
struct CheckEddDM: Codable {
|
||||
let result: ResultData?
|
||||
|
||||
// MARK: - ResultData
|
||||
struct ResultData: Codable {
|
||||
let fmPincode, fmMessage, lmPincode, lmMessage: String?
|
||||
let edd: String?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case fmPincode = "fm_pincode"
|
||||
case fmMessage = "fm_message"
|
||||
case lmPincode = "lm_pincode"
|
||||
case lmMessage = "lm_message"
|
||||
case edd = "EDD"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ class AddressCell: UITableViewCell {
|
||||
@IBOutlet weak var addressLine: LocalisedElementsLabel!
|
||||
@IBOutlet weak var phoneNo: LocalisedElementsLabel!
|
||||
@IBOutlet weak var expecteDelivery: LocalisedElementsLabel!
|
||||
@IBOutlet weak var radioImage: UIImageView!
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
@@ -33,6 +34,16 @@ class AddressCell: UITableViewCell {
|
||||
let pincode = data.pincode ?? ""
|
||||
self.addressLine.text = address + city + state + ",\n" + pincode
|
||||
self.phoneNo.text = "Phone No. : " + (data.phoneNo ?? "+0")
|
||||
self.expecteDelivery.text = data.addressName
|
||||
|
||||
if let defaults = data.isDefault, defaults{
|
||||
self.radioImage.image = UIImage(named: "RadioOn")
|
||||
self.expecteDelivery.text = ""
|
||||
if let eddDate = data.eddDate{
|
||||
self.expecteDelivery.text = "Expected Delivery by" + "\n" + (data.eddDate ?? "NA")
|
||||
}
|
||||
}else{
|
||||
self.radioImage.image = UIImage(named: "RadioOff")
|
||||
self.expecteDelivery.text = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="RadioOff" translatesAutoresizingMaskIntoConstraints="NO" id="Lza-Qf-6mN">
|
||||
<rect key="frame" x="0.0" y="5" width="25" height="25"/>
|
||||
<color key="tintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<color key="tintColor" name="ImageDarkBlue"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="Lza-Qf-6mN" secondAttribute="height" multiplier="1:1" id="g1r-qQ-2zw"/>
|
||||
</constraints>
|
||||
@@ -67,10 +67,10 @@
|
||||
<color key="textColor" name="ImageDarkBlue"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Mixed title" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1Eb-Np-qtk" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Mixed title" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1Eb-Np-qtk" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="54" width="397" height="105"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="15"/>
|
||||
<color key="textColor" name="ImageDarkBlue"/>
|
||||
<color key="textColor" systemColor="systemRedColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
@@ -91,6 +91,7 @@
|
||||
<outlet property="addressName" destination="n7d-QN-AjF" id="Jzv-zj-Crm"/>
|
||||
<outlet property="expecteDelivery" destination="1Eb-Np-qtk" id="1aj-QN-JIe"/>
|
||||
<outlet property="phoneNo" destination="b3c-3t-x7Z" id="Dfe-Xz-EDm"/>
|
||||
<outlet property="radioImage" destination="Lza-Qf-6mN" id="vrJ-eV-SgO"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="230.53435114503816" y="32.74647887323944"/>
|
||||
</tableViewCell>
|
||||
@@ -103,5 +104,8 @@
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
<systemColor name="systemRedColor">
|
||||
<color red="1" green="0.23137254901960785" blue="0.18823529411764706" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -22,13 +22,23 @@ class AddressListVM{
|
||||
}
|
||||
|
||||
func addGradient(){
|
||||
self.vc.title = "PAYMENT OPTIONS".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
|
||||
let color1 = #colorLiteral(red: 0.6745098039, green: 0.6235294118, blue: 0.1725490196, alpha: 1)
|
||||
let color2 = #colorLiteral(red: 0.5450980392, green: 0.6745098039, blue: 0.1725490196, alpha: 1)
|
||||
|
||||
vc.view.applyGradient(colors: [color2, color1], startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0.8, y: 0))
|
||||
}
|
||||
|
||||
func addBtnGradient(){
|
||||
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)
|
||||
let color3 = #colorLiteral(red: 0.968627451, green: 0.4196078431, blue: 0.1098039216, alpha: 1)
|
||||
let color4 = #colorLiteral(red: 0.968627451, green: 0.7882352941, blue: 0.1294117647, alpha: 1)
|
||||
vc.useSelectedAddBtn.applyGradient(colors: [color1, color2], startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0.8, y: 0))
|
||||
vc.addNewAddressBtn.applyGradient(colors: [color3, color4], startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0.8, y: 0))
|
||||
vc.useSelectedAddBtn.roundCorner()
|
||||
vc.addNewAddressBtn.roundCorner()
|
||||
}
|
||||
|
||||
func setupCell(){
|
||||
vc.tableView.register(UINib(nibName: K.CellIdentifier.Cart.addressCell, bundle: nil), forCellReuseIdentifier: K.CellIdentifier.Cart.addressCell)
|
||||
vc.tableView.delegate = vc.self
|
||||
@@ -38,6 +48,7 @@ class AddressListVM{
|
||||
// MARK: - Get Address list
|
||||
|
||||
func getAddressListing(){
|
||||
Utilities.startProgressHUD()
|
||||
let headers : HTTPHeaders = ["access-token" : AuthFunc.shareInstance.getAccessToken()]
|
||||
|
||||
NetworkManager.shareInstance.apiRequest(url: APIEndPoints.Cart.parent_address_listing, method: .get,headers: headers) { [weak self](result : Result<BaseResponseModel<[AddressListDM]>, NetworkManager.APIError>) in
|
||||
@@ -57,8 +68,13 @@ class AddressListVM{
|
||||
Utilities.dismissProgressHUD()
|
||||
guard let data = data.data else{return}
|
||||
self.addressData = data
|
||||
if self.addressData.count != 0{
|
||||
self.addressData[0].isDefault = true
|
||||
}
|
||||
self.vc.tableView.reloadData()
|
||||
print(data)
|
||||
if let pincode = self.addressData.first?.pincode , let id = self.addressData.first?.id{
|
||||
checkEstimatedDeliveryData(pinCode: pincode, id: id)
|
||||
}
|
||||
default:
|
||||
Utilities.dismissProgressHUD()
|
||||
break
|
||||
@@ -77,4 +93,42 @@ class AddressListVM{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func checkEstimatedDeliveryData(pinCode : String, id : Int){
|
||||
let headers : HTTPHeaders = ["access-token" : AuthFunc.shareInstance.getAccessToken()]
|
||||
let params : Parameters = ["pincode" : pinCode]
|
||||
NetworkManager.shareInstance.apiRequest(url: APIEndPoints.Cart.pincode_serviceability_check_edd, method: .post, parameters: params,headers: headers) { [weak self](result : Result<BaseResponseModel<CheckEddDM>, NetworkManager.APIError>) in
|
||||
switch result{
|
||||
case .success(let data):
|
||||
guard let self else{
|
||||
Utilities.dismissProgressHUD()
|
||||
return
|
||||
}
|
||||
switch data.success{
|
||||
case 0:
|
||||
/*
|
||||
Error
|
||||
*/
|
||||
Utilities.dismissProgressHUD()
|
||||
case 1:
|
||||
Utilities.dismissProgressHUD()
|
||||
guard let data = data.data?.result else{return}
|
||||
if let index = self.addressData.firstIndex(where: {$0.id == id}){
|
||||
self.addressData[index].eddDate = data.edd
|
||||
self.vc.tableView.reloadData()
|
||||
}
|
||||
default:
|
||||
Utilities.dismissProgressHUD()
|
||||
break
|
||||
}
|
||||
case .failure(let error):
|
||||
guard let self else{
|
||||
Utilities.dismissProgressHUD()
|
||||
return
|
||||
}
|
||||
Utilities.dismissProgressHUD()
|
||||
Utilities.alert(title: "Error", message: error.localizedDescription, viewController: self.vc)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ extension K{
|
||||
struct Shop{
|
||||
static let shopListingCell = "ShopListingCell"
|
||||
static let shopProductsCell = "ShopProductsCell"
|
||||
static let shopProductImageCell = "ShopProductImageCell"
|
||||
}
|
||||
|
||||
struct Cart{
|
||||
|
||||
@@ -97,6 +97,7 @@ extension K{
|
||||
static let shopListingVC = "ShopListingVC"
|
||||
static let shopCategoryVC = "ShopCategoryVC"
|
||||
static let shopProductsVC = "ShopProductsVC"
|
||||
static let productDetailsVC = "ProductDetailsVC"
|
||||
}
|
||||
|
||||
// MARK: - Cart
|
||||
|
||||
@@ -16,4 +16,8 @@ enum TopViewEnum{
|
||||
enum TopViewPush{
|
||||
case webseries
|
||||
case liveTV
|
||||
case games
|
||||
case audioBooks
|
||||
case karaoke
|
||||
case shop
|
||||
}
|
||||
|
||||
@@ -537,7 +537,8 @@
|
||||
<wkWebView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="k9t-dv-nhb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<wkWebViewConfiguration key="configuration">
|
||||
<wkWebViewConfiguration key="configuration" allowsAirPlayForMediaPlayback="NO" allowsPictureInPictureMediaPlayback="NO">
|
||||
<dataDetectorTypes key="dataDetectorTypes"/>
|
||||
<audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/>
|
||||
<wkPreferences key="preferences"/>
|
||||
</wkWebViewConfiguration>
|
||||
|
||||
91
WOKA/Helpers/Shadows/SwiftyInnerShadowLayer.swift
Normal file
91
WOKA/Helpers/Shadows/SwiftyInnerShadowLayer.swift
Normal file
@@ -0,0 +1,91 @@
|
||||
//
|
||||
// SwiftyInnerShadowLayer.swift
|
||||
// SwiftyShadowExample
|
||||
//
|
||||
// Created by luan on 7/11/17.
|
||||
// Copyright © 2017 luantran. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
public class SwiftyInnerShadowLayer: CAShapeLayer {
|
||||
|
||||
override init() {
|
||||
super.init()
|
||||
initShadow()
|
||||
}
|
||||
|
||||
override public init(layer: Any) {
|
||||
super.init(layer: layer)
|
||||
}
|
||||
|
||||
required public init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
initShadow()
|
||||
}
|
||||
|
||||
override public var shadowOffset: CGSize {
|
||||
didSet {
|
||||
setNeedsLayout()
|
||||
}
|
||||
}
|
||||
|
||||
override public var shadowOpacity: Float {
|
||||
didSet {
|
||||
setNeedsLayout()
|
||||
}
|
||||
}
|
||||
|
||||
override public var shadowRadius: CGFloat {
|
||||
didSet {
|
||||
setNeedsLayout()
|
||||
}
|
||||
}
|
||||
|
||||
override public var shadowColor: CGColor? {
|
||||
didSet {
|
||||
setNeedsLayout()
|
||||
}
|
||||
}
|
||||
|
||||
func initShadow() {
|
||||
masksToBounds = true
|
||||
shouldRasterize = true
|
||||
|
||||
fillRule = CAShapeLayerFillRule.evenOdd
|
||||
borderColor = UIColor.clear.cgColor
|
||||
}
|
||||
|
||||
override public func layoutSublayers() {
|
||||
super.layoutSublayers()
|
||||
|
||||
generateShadowPath()
|
||||
}
|
||||
|
||||
func generateShadowPath() {
|
||||
let top = shadowRadius - shadowOffset.height
|
||||
let bottom = shadowRadius + shadowOffset.height
|
||||
let left = shadowRadius - shadowOffset.width
|
||||
let right = shadowRadius + shadowOffset.width
|
||||
let shadowRect = CGRect(x: bounds.origin.x - left,
|
||||
y: bounds.origin.y - top,
|
||||
width: bounds.width + left + right,
|
||||
height: bounds.height + top + bottom)
|
||||
|
||||
let path = CGMutablePath()
|
||||
let delta: CGFloat = 1
|
||||
let rect = CGRect(x: bounds.origin.x - delta, y: bounds.origin.y - delta, width: bounds.width + delta * 2, height: bounds.height + delta * 2)
|
||||
let bezier: UIBezierPath = {
|
||||
if cornerRadius > 0 {
|
||||
return UIBezierPath(roundedRect: rect, cornerRadius: cornerRadius)
|
||||
} else {
|
||||
return UIBezierPath(rect: rect)
|
||||
}
|
||||
}()
|
||||
path.addPath(bezier.cgPath)
|
||||
path.addRect(shadowRect)
|
||||
path.closeSubpath()
|
||||
self.path = path
|
||||
}
|
||||
|
||||
}
|
||||
48
WOKA/Helpers/Shadows/SwiftyInnerShadowView.swift
Normal file
48
WOKA/Helpers/Shadows/SwiftyInnerShadowView.swift
Normal file
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// SwiftyInnerShadowView.swift
|
||||
// SwiftyShadowExample
|
||||
//
|
||||
// Created by luan on 7/11/17.
|
||||
// Copyright © 2017 luantran. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
open class SwiftyInnerShadowView: UIView {
|
||||
|
||||
open var shadowLayer = SwiftyInnerShadowLayer()
|
||||
|
||||
override open var bounds: CGRect {
|
||||
didSet {
|
||||
shadowLayer.frame = bounds
|
||||
}
|
||||
}
|
||||
|
||||
override open var frame: CGRect {
|
||||
didSet {
|
||||
shadowLayer.frame = bounds
|
||||
}
|
||||
}
|
||||
|
||||
open var cornerRadius: CGFloat = 0 {
|
||||
didSet {
|
||||
layer.cornerRadius = cornerRadius
|
||||
shadowLayer.cornerRadius = cornerRadius
|
||||
}
|
||||
}
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
initShadowLayer()
|
||||
}
|
||||
|
||||
required public init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
initShadowLayer()
|
||||
}
|
||||
|
||||
fileprivate func initShadowLayer() {
|
||||
layer.addSublayer(shadowLayer)
|
||||
}
|
||||
|
||||
}
|
||||
86
WOKA/Helpers/Shadows/UIView.swift
Normal file
86
WOKA/Helpers/Shadows/UIView.swift
Normal file
@@ -0,0 +1,86 @@
|
||||
//
|
||||
// UIView.swift
|
||||
// SwiftyShadow
|
||||
//
|
||||
// Created by luan on 7/23/17.
|
||||
//
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
extension UIView {
|
||||
|
||||
public func generateOuterShadow() {
|
||||
let view = UIView()
|
||||
view.translatesAutoresizingMaskIntoConstraints = false
|
||||
view.layer.cornerRadius = layer.cornerRadius
|
||||
view.layer.shadowRadius = layer.shadowRadius
|
||||
view.layer.shadowOpacity = layer.shadowOpacity
|
||||
view.layer.shadowColor = layer.shadowColor
|
||||
view.layer.shadowOffset = layer.shadowOffset
|
||||
view.clipsToBounds = false
|
||||
view.backgroundColor = .clear
|
||||
view.isUserInteractionEnabled = false
|
||||
// superview?.insertSubview(view, belowSubview: self)
|
||||
|
||||
superview?.insertSubview(view, aboveSubview: self)
|
||||
|
||||
let constraints = [
|
||||
NSLayoutConstraint(item: view, attribute: .left, relatedBy: .equal, toItem: self, attribute: .left, multiplier: 1.0, constant: 0.0),
|
||||
NSLayoutConstraint(item: view, attribute: .right, relatedBy: .equal, toItem: self, attribute: .right, multiplier: 1.0, constant: 0.0),
|
||||
NSLayoutConstraint(item: view, attribute: .top, relatedBy: .equal, toItem: self, attribute: .top, multiplier: 1.0, constant: 0.0),
|
||||
NSLayoutConstraint(item: view, attribute: .bottom, relatedBy: .equal, toItem: self, attribute: .bottom, multiplier: 1.0, constant: 0.0),
|
||||
]
|
||||
superview?.addConstraints(constraints)
|
||||
}
|
||||
|
||||
public func generateInnerShadow() {
|
||||
let view = SwiftyInnerShadowView()
|
||||
view.translatesAutoresizingMaskIntoConstraints = false
|
||||
view.shadowLayer.cornerRadius = layer.cornerRadius
|
||||
view.shadowLayer.shadowRadius = layer.shadowRadius
|
||||
view.shadowLayer.shadowOpacity = layer.shadowOpacity
|
||||
view.shadowLayer.shadowColor = layer.shadowColor
|
||||
view.shadowLayer.shadowOffset = layer.shadowOffset
|
||||
view.clipsToBounds = false
|
||||
view.backgroundColor = .clear
|
||||
|
||||
superview?.insertSubview(view, aboveSubview: self)
|
||||
|
||||
let constraints = [
|
||||
NSLayoutConstraint(item: view, attribute: .left, relatedBy: .equal, toItem: self, attribute: .left, multiplier: 1.0, constant: 0.0),
|
||||
NSLayoutConstraint(item: view, attribute: .right, relatedBy: .equal, toItem: self, attribute: .right, multiplier: 1.0, constant: 0.0),
|
||||
NSLayoutConstraint(item: view, attribute: .top, relatedBy: .equal, toItem: self, attribute: .top, multiplier: 1.0, constant: 0.0),
|
||||
NSLayoutConstraint(item: view, attribute: .bottom, relatedBy: .equal, toItem: self, attribute: .bottom, multiplier: 1.0, constant: 0.0),
|
||||
]
|
||||
superview?.addConstraints(constraints)
|
||||
}
|
||||
|
||||
public func generateEllipticalShadow() {
|
||||
let view = UIView()
|
||||
view.translatesAutoresizingMaskIntoConstraints = false
|
||||
view.layer.cornerRadius = layer.cornerRadius
|
||||
view.layer.shadowRadius = layer.shadowRadius
|
||||
view.layer.shadowOpacity = layer.shadowOpacity
|
||||
view.layer.shadowColor = layer.shadowColor
|
||||
view.layer.shadowOffset = layer.shadowOffset
|
||||
view.clipsToBounds = false
|
||||
view.backgroundColor = .clear
|
||||
|
||||
let ovalRect = CGRect(x: 0, y: frame.size.height + 10, width: frame.size.width, height: 15)
|
||||
let path = UIBezierPath(ovalIn: ovalRect)
|
||||
|
||||
view.layer.shadowPath = path.cgPath
|
||||
|
||||
superview?.insertSubview(view, belowSubview: self)
|
||||
|
||||
let constraints = [
|
||||
NSLayoutConstraint(item: view, attribute: .left, relatedBy: .equal, toItem: self, attribute: .left, multiplier: 1.0, constant: 0.0),
|
||||
NSLayoutConstraint(item: view, attribute: .right, relatedBy: .equal, toItem: self, attribute: .right, multiplier: 1.0, constant: 0.0),
|
||||
NSLayoutConstraint(item: view, attribute: .top, relatedBy: .equal, toItem: self, attribute: .top, multiplier: 1.0, constant: 0.0),
|
||||
NSLayoutConstraint(item: view, attribute: .bottom, relatedBy: .equal, toItem: self, attribute: .bottom, multiplier: 1.0, constant: 0.0),
|
||||
]
|
||||
superview?.addConstraints(constraints)
|
||||
}
|
||||
|
||||
}
|
||||
28
WOKA/Helpers/VersionTexts.swift
Normal file
28
WOKA/Helpers/VersionTexts.swift
Normal file
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// VersionTexts.swift
|
||||
// WOKA
|
||||
//
|
||||
// Created by Bilal on 26/07/2024.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Bundle {
|
||||
public var appName: String { getInfo("CFBundleName") }
|
||||
public var displayName: String { getInfo("CFBundleDisplayName") }
|
||||
public var language: String { getInfo("CFBundleDevelopmentRegion") }
|
||||
public var identifier: String { getInfo("CFBundleIdentifier") }
|
||||
public var copyright: String { getInfo("NSHumanReadableCopyright").replacingOccurrences(of: "\\\\n", with: "\n") }
|
||||
|
||||
public var appBuild: String { getInfo("CFBundleVersion") }
|
||||
public var appVersionLong: String { getInfo("CFBundleShortVersionString") }
|
||||
//public var appVersionShort: String { getInfo("CFBundleShortVersion") }
|
||||
|
||||
fileprivate func getInfo(_ str: String) -> String { infoDictionary?[str] as? String ?? "⚠️" }
|
||||
|
||||
/*
|
||||
Usage
|
||||
Text("Ver: \(Bundle.main.appVersionLong) (\(Bundle.main.appBuild)) ")
|
||||
|
||||
*/
|
||||
}
|
||||
@@ -71,6 +71,50 @@ class ExploreWokaVC: UIViewController {
|
||||
NotificationCenter.default.post(name: NSNotification.Name(K.NotificationCenterReloads.myListPush), object: nil, userInfo: ["action": TopViewPush.webseries])
|
||||
}
|
||||
}
|
||||
case gamesBtn:
|
||||
self.dismiss(animated: true) {
|
||||
switch K.GVar.topView{
|
||||
case .theme1:
|
||||
NotificationCenter.default.post(name: NSNotification.Name(K.NotificationCenterReloads.themeOnePush), object: nil, userInfo: ["action": TopViewPush.games])
|
||||
case .theme2:
|
||||
NotificationCenter.default.post(name: NSNotification.Name(K.NotificationCenterReloads.themeTwoPush), object: nil, userInfo: ["action": TopViewPush.games])
|
||||
case .myList:
|
||||
NotificationCenter.default.post(name: NSNotification.Name(K.NotificationCenterReloads.myListPush), object: nil, userInfo: ["action": TopViewPush.games])
|
||||
}
|
||||
}
|
||||
case audioBookBtn:
|
||||
self.dismiss(animated: true) {
|
||||
switch K.GVar.topView{
|
||||
case .theme1:
|
||||
NotificationCenter.default.post(name: NSNotification.Name(K.NotificationCenterReloads.themeOnePush), object: nil, userInfo: ["action": TopViewPush.audioBooks])
|
||||
case .theme2:
|
||||
NotificationCenter.default.post(name: NSNotification.Name(K.NotificationCenterReloads.themeTwoPush), object: nil, userInfo: ["action": TopViewPush.audioBooks])
|
||||
case .myList:
|
||||
NotificationCenter.default.post(name: NSNotification.Name(K.NotificationCenterReloads.myListPush), object: nil, userInfo: ["action": TopViewPush.audioBooks])
|
||||
}
|
||||
}
|
||||
case karaokeBtn:
|
||||
self.dismiss(animated: true) {
|
||||
switch K.GVar.topView{
|
||||
case .theme1:
|
||||
NotificationCenter.default.post(name: NSNotification.Name(K.NotificationCenterReloads.themeOnePush), object: nil, userInfo: ["action": TopViewPush.karaoke])
|
||||
case .theme2:
|
||||
NotificationCenter.default.post(name: NSNotification.Name(K.NotificationCenterReloads.themeTwoPush), object: nil, userInfo: ["action": TopViewPush.karaoke])
|
||||
case .myList:
|
||||
NotificationCenter.default.post(name: NSNotification.Name(K.NotificationCenterReloads.myListPush), object: nil, userInfo: ["action": TopViewPush.karaoke])
|
||||
}
|
||||
}
|
||||
case shopBtn:
|
||||
self.dismiss(animated: true) {
|
||||
switch K.GVar.topView{
|
||||
case .theme1:
|
||||
NotificationCenter.default.post(name: NSNotification.Name(K.NotificationCenterReloads.themeOnePush), object: nil, userInfo: ["action": TopViewPush.shop])
|
||||
case .theme2:
|
||||
NotificationCenter.default.post(name: NSNotification.Name(K.NotificationCenterReloads.themeTwoPush), object: nil, userInfo: ["action": TopViewPush.shop])
|
||||
case .myList:
|
||||
NotificationCenter.default.post(name: NSNotification.Name(K.NotificationCenterReloads.myListPush), object: nil, userInfo: ["action": TopViewPush.shop])
|
||||
}
|
||||
}
|
||||
case liveTvBtn:
|
||||
self.dismiss(animated: true) {
|
||||
NotificationCenter.default.post(name: NSNotification.Name(K.NotificationCenterReloads.themeOnePush), object: nil, userInfo: ["action": TopViewPush.liveTV])
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iqc-o5-ovk">
|
||||
<rect key="frame" x="82" y="59" width="348" height="839"/>
|
||||
<rect key="frame" x="82" y="59" width="348" height="839.00000000000023"/>
|
||||
<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="348" height="1073.6666666666667"/>
|
||||
@@ -544,6 +544,7 @@
|
||||
<connections>
|
||||
<outlet property="aboutBtn" destination="27K-dP-rLv" id="kBm-r0-Bxg"/>
|
||||
<outlet property="addChildBtn" destination="ol4-co-NoI" id="utf-rG-dMo"/>
|
||||
<outlet property="appVersion" destination="bOt-Ov-fli" id="eMr-2I-dDG"/>
|
||||
<outlet property="avatarImage" destination="9zy-xC-ddd" id="efq-RR-ZHd"/>
|
||||
<outlet property="deactivateBtn" destination="QgY-e1-Fgb" id="ZaU-v0-APM"/>
|
||||
<outlet property="disclaimerBtn" destination="DDe-vK-Hd2" id="0Xa-lw-KkC"/>
|
||||
@@ -1373,10 +1374,10 @@
|
||||
<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>
|
||||
<systemColor name="systemMintColor">
|
||||
<color red="0.0" green="0.78039215689999997" blue="0.74509803919999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color red="0.0" green="0.7803921568627451" blue="0.74509803921568629" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -50,6 +50,22 @@ class MyListVM{
|
||||
let sb = UIStoryboard(name: K.StoryBoard.webSeries, bundle: nil)
|
||||
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.WebSeries.webSeriesVC) as! WebSeriesVC
|
||||
vc.navigationController?.pushViewController(vcPush, animated: true)
|
||||
case .audioBooks:
|
||||
let sb = UIStoryboard(name: K.StoryBoard.audioBooks, bundle: nil)
|
||||
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.AudioBooks.audioBookHomeVC) as! AudioBookHomeVC
|
||||
vc.navigationController?.pushViewController(vcPush, animated: true)
|
||||
case .games:
|
||||
let sb = UIStoryboard(name: K.StoryBoard.Games, bundle: nil)
|
||||
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Games.gamesListVC) as! GamesListVC
|
||||
vc.navigationController?.pushViewController(vcPush, animated: true)
|
||||
case .karaoke:
|
||||
let sb = UIStoryboard(name: K.StoryBoard.Karaoke, bundle: nil)
|
||||
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Karaoke.karaokeListingVC) as! KaraokeListingVC
|
||||
vc.navigationController?.pushViewController(vcPush, animated: true)
|
||||
case .shop:
|
||||
let sb = UIStoryboard(name: K.StoryBoard.shop, bundle: nil)
|
||||
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Shop.shopListingVC) as! ShopListingVC
|
||||
vc.navigationController?.pushViewController(vcPush, animated: true)
|
||||
case .liveTV:
|
||||
break
|
||||
// playLiveTV()
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>Give Permissions for Karaoke</string>
|
||||
<key>API_KEY_ID</key>
|
||||
<string>$(API_KEY_ID)</string>
|
||||
<key>API_KEY_PASS</key>
|
||||
|
||||
@@ -49,6 +49,7 @@ class JWKaraokePlayerVC: JWPlayerViewController, JWPlayerViewControllerDelegate
|
||||
self.view.bringSubviewToFront(outerStack)
|
||||
self.view.bringSubviewToFront(backButton)
|
||||
setupKaraoke()
|
||||
self.downloadRecordingBtn.isEnabled = false
|
||||
}
|
||||
|
||||
// MARK: - AudioRecording
|
||||
@@ -252,7 +253,7 @@ class JWKaraokePlayerVC: JWPlayerViewController, JWPlayerViewControllerDelegate
|
||||
asset.writeAudioTrackToURL(outputURL) { [weak self] isDone, error,url in
|
||||
guard let self else{return}
|
||||
print(isDone, error , url)
|
||||
if error == nil{
|
||||
if error == nil && isDone{
|
||||
hideShowKaraoke(isLoading: false)
|
||||
self.audioURLFromMP4 = url
|
||||
self.setupAudio()
|
||||
@@ -287,6 +288,8 @@ class JWKaraokePlayerVC: JWPlayerViewController, JWPlayerViewControllerDelegate
|
||||
}
|
||||
|
||||
@IBAction func startRecordingBtnTapped(_ sender: LocalisedElementsButton) {
|
||||
if AuthFunc.shareInstance.guestUserLoginPopUp() { return}
|
||||
|
||||
self.playBtn.isEnabled = false
|
||||
if isRecording {
|
||||
stopRecording()
|
||||
|
||||
@@ -12,6 +12,8 @@ import JWPlayerKit
|
||||
|
||||
@main
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
|
||||
var window: UIWindow?
|
||||
|
||||
var myOrientation: UIInterfaceOrientationMask = .portrait
|
||||
|
||||
@@ -19,14 +21,20 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
return myOrientation
|
||||
}
|
||||
|
||||
private func registerCustomFonts() {
|
||||
let fonts = Bundle.main.urls(forResourcesWithExtension: "ttf", subdirectory: nil)
|
||||
fonts?.forEach { url in
|
||||
CTFontManagerRegisterFontsForURL(url as CFURL, .process, nil)
|
||||
}
|
||||
}
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||
|
||||
// enabling the IQKeyboard manager instance
|
||||
IQKeyboardManager.shared.enable = true
|
||||
IQKeyboardManager.shared.resignOnTouchOutside = true
|
||||
// IQKeyboardManager.shared.enableAutoToolbar = false
|
||||
// IQKeyboardManager.shared.layoutIfNeededOnUpdate = true
|
||||
|
||||
registerCustomFonts()
|
||||
// Set the authentication ID Pass after app starts
|
||||
AuthFunc.shareInstance.setAuthIDPass()
|
||||
|
||||
@@ -43,12 +51,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
return true
|
||||
}
|
||||
|
||||
// var myOrientation: UIInterfaceOrientationMask = .portrait
|
||||
//
|
||||
// func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
|
||||
// return myOrientation
|
||||
// }
|
||||
|
||||
// MARK: UISceneSession Lifecycle
|
||||
|
||||
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
|
||||
|
||||
@@ -113,6 +113,7 @@ struct APIEndPoints {
|
||||
static let category_listing = makeURL(path: "category_listing")
|
||||
static let sub_category_listing = makeURL(path: "sub_category_listing")
|
||||
static let shop_product_listing = makeURL(path: "shop_product_listing")
|
||||
static let shop_product_listing_v2 = makeURL(path: "v2/shop_product_listing")
|
||||
}
|
||||
|
||||
struct Cart{
|
||||
@@ -122,6 +123,7 @@ struct APIEndPoints {
|
||||
static let applied_coupon_discount = makeURL(path: "applied_coupon_discount")
|
||||
static let create_new_order = makeURL(path: "create_new_order")
|
||||
static let parent_address_listing = makeURL(path: "parent_address_listing")
|
||||
static let pincode_serviceability_check_edd = makeURL(path: "pincode_serviceability_check_edd")
|
||||
}
|
||||
|
||||
// Other endpoint categories...
|
||||
|
||||
103
WOKA/Shop/Controller/ProductDetailsVC.swift
Normal file
103
WOKA/Shop/Controller/ProductDetailsVC.swift
Normal file
@@ -0,0 +1,103 @@
|
||||
//
|
||||
// ProductDetailsVC.swift
|
||||
// WOKA
|
||||
//
|
||||
// Created by Bilal on 26/07/2024.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class ProductDetailsVC: UIViewController {
|
||||
|
||||
@IBOutlet weak var productTitle: UILabel!
|
||||
@IBOutlet weak var categoryName: UILabel!
|
||||
@IBOutlet weak var skuID: UILabel!
|
||||
@IBOutlet weak var productPrice: UILabel!
|
||||
@IBOutlet weak var productDescription: UILabel!
|
||||
@IBOutlet weak var addToCartBtn: LocalisedElementsButton!
|
||||
@IBOutlet weak var pageControl: UIPageControl!
|
||||
@IBOutlet weak var productImageCV: UICollectionView!
|
||||
@IBOutlet weak var shadowView: UIView!
|
||||
|
||||
var vm = ProductDetailsVM()
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
vm.vc = self
|
||||
vm.initView()
|
||||
|
||||
navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
|
||||
navigationController?.navigationBar.shadowImage = UIImage()
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
self.navigationController?.setNavigationBarHidden(false, animated: animated)
|
||||
}
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
self.navigationController?.setColor(color: .white)
|
||||
}
|
||||
|
||||
override func viewWillDisappear(_ animated: Bool) {
|
||||
super.viewWillDisappear(animated)
|
||||
self.navigationController?.setNavigationBarHidden(true, animated: animated)
|
||||
}
|
||||
|
||||
override func viewDidDisappear(_ animated: Bool) {
|
||||
super.viewDidDisappear(animated)
|
||||
|
||||
// Customize the navigation bar's appearance
|
||||
self.navigationController?.setColor(color: .black)
|
||||
}
|
||||
|
||||
@IBAction func pageControl(_ sender: UIPageControl) {
|
||||
self.productImageCV.scrollToItem(at: IndexPath(row: sender.currentPage, section: 0), at: .centeredHorizontally, animated: true)
|
||||
}
|
||||
|
||||
@IBAction func addToCartBtnTapped(_ sender: LocalisedElementsButton) {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Collection delegate and datasource
|
||||
|
||||
extension ProductDetailsVC : UICollectionViewDelegate,UICollectionViewDataSource{
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||
return vm.productDetails?.shopImage?.count ?? 0
|
||||
}
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: K.CellIdentifier.Shop.shopProductImageCell, for: indexPath) as! ShopProductImageCell
|
||||
if let data = vm.productDetails?.shopImage?[indexPath.row]{
|
||||
cell.setData(image: data)
|
||||
}
|
||||
return cell
|
||||
}
|
||||
|
||||
// MARK: - Collection Scroll Handling
|
||||
|
||||
func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
|
||||
let visibleRect = CGRect(origin: self.productImageCV.contentOffset, size: self.productImageCV.bounds.size)
|
||||
let visiblePoint = CGPoint(x: visibleRect.midX, y: visibleRect.midY)
|
||||
if let visibleIndexPath = self.productImageCV.indexPathForItem(at: visiblePoint) {
|
||||
self.pageControl.currentPage = visibleIndexPath.row
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Collection Flow Layout
|
||||
|
||||
extension ProductDetailsVC : UICollectionViewDelegateFlowLayout{
|
||||
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
|
||||
return 10
|
||||
}
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
|
||||
let frameSize = collectionView.frame.size
|
||||
return CGSize(width: frameSize.width - 10, height: frameSize.height)
|
||||
}
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
|
||||
return UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 5)
|
||||
}
|
||||
}
|
||||
@@ -9,9 +9,9 @@ import UIKit
|
||||
|
||||
class ShopProductsVC: UIViewController {
|
||||
|
||||
@IBOutlet weak var collectionView: UICollectionView!
|
||||
@IBOutlet weak var subCategoryCV: UICollectionView!
|
||||
@IBOutlet weak var productCV: UICollectionView!
|
||||
@IBOutlet weak var spinnerView: UIActivityIndicatorView!
|
||||
|
||||
var vm = ShopProductsVM()
|
||||
|
||||
@@ -114,14 +114,24 @@ extension ShopProductsVC : CollectionViewSRC{
|
||||
|
||||
}
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {
|
||||
if collectionView == productCV{
|
||||
if vm.stopFetch{return}
|
||||
if indexPath.row == productCV.numberOfItems(inSection: 0) - 1{
|
||||
spinnerView.startAnimating()
|
||||
vm.pageNo += 1
|
||||
vm.getShopProducts(subCategoryID: vm.selectedSubCategory)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
|
||||
// vm.episodeSelectedCateogory = vm.seasonListingData[indexPath.row].id
|
||||
// vm.setSeasonData()
|
||||
// episodeTitle.isHidden = false
|
||||
// episodeTitle.text = ""
|
||||
// vm.getSeasonEpisode()
|
||||
// vm.getTeaserListing()
|
||||
// self.categoryCV.reloadData()
|
||||
let data = vm.shopProductsData[indexPath.row]
|
||||
let sb = UIStoryboard(name: K.StoryBoard.shop, bundle: nil)
|
||||
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Shop.productDetailsVC) as! ProductDetailsVC
|
||||
vcPush.vm.categoryName = vm.pageTitle ?? "Shop"
|
||||
vcPush.vm.productDetails = data
|
||||
self.navigationController?.pushViewController(vcPush, animated: true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,27 +140,31 @@ extension ShopProductsVC : CollectionViewSRC{
|
||||
extension ShopProductsVC : UICollectionViewDelegateFlowLayout{
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
|
||||
|
||||
if collectionView == subCategoryCV{
|
||||
// Generate a random string for testing purposes
|
||||
let randomText = vm.subCategoryData[indexPath.row].subCategoryName!
|
||||
|
||||
|
||||
// Define the font for the text
|
||||
let font = FontCustom.shareInstance.customFont(fontName: .Exo2_Bold, size: 18) // Adjust the font size as needed
|
||||
|
||||
|
||||
// Calculate the width of the text
|
||||
let attributes = [NSAttributedString.Key.font: font]
|
||||
let textWidth = (randomText as NSString).size(withAttributes: attributes).width
|
||||
|
||||
|
||||
// Set the cell width based on the text width and any additional padding
|
||||
// 14 for container view + 10 for inside spacing.
|
||||
let padding: CGFloat = 24 + 20 // Adjust padding as needed
|
||||
let cellWidth = textWidth + padding
|
||||
return CGSize(width: cellWidth , height: 60)
|
||||
}else{
|
||||
return CGSize(width: 100, height: 100)
|
||||
let numberOfItemsPerRow: CGFloat = 2
|
||||
let itemSpacing: CGFloat = 10
|
||||
let totalSpacing = (numberOfItemsPerRow - 1) * itemSpacing
|
||||
let totalWidth = collectionView.frame.width - totalSpacing
|
||||
let itemWidth = totalWidth / numberOfItemsPerRow
|
||||
let itemHeight = itemWidth - 20 // Adjust based on your needs
|
||||
|
||||
return CGSize(width: itemWidth, height: itemHeight)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
//
|
||||
// ShopProductDM.swift
|
||||
// WOKA
|
||||
//
|
||||
// Created by MacBook Pro on 22/07/24.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
// MARK: - ShopProductDM
|
||||
struct ShopProductDM: Codable {
|
||||
let result: ResultData?
|
||||
|
||||
// MARK: - ResultData
|
||||
struct ResultData: Codable {
|
||||
let sabakDegiNaniSeries: [SabakDegiNaniSery]?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case sabakDegiNaniSeries = "Sabak Degi Nani Series"
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - SabakDegiNaniSery
|
||||
struct SabakDegiNaniSery: Codable {
|
||||
let id: Int?
|
||||
let skuID, productName, productThumbnail: String?
|
||||
let categoryMasterID, subCategoryMasterID: Int?
|
||||
let productPrice: String?
|
||||
let remainStockQuantity: Int?
|
||||
let stockStatus: String?
|
||||
// let taxCategory: JSONNull?
|
||||
let taxValue: String?
|
||||
let shopMasterDetail: ShopMasterDetail?
|
||||
let shopImage: [String]?
|
||||
let addedToCart: Bool?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case id
|
||||
case skuID = "sku_id"
|
||||
case productName = "product_name"
|
||||
case productThumbnail = "product_thumbnail"
|
||||
case categoryMasterID = "category_master_id"
|
||||
case subCategoryMasterID = "sub_category_master_id"
|
||||
case productPrice = "product_price"
|
||||
case remainStockQuantity = "remain_stock_quantity"
|
||||
case stockStatus = "stock_status"
|
||||
// case taxCategory = "tax_category"
|
||||
case taxValue = "tax_value"
|
||||
case shopMasterDetail = "shop_master_detail"
|
||||
case shopImage = "shop_image"
|
||||
case addedToCart = "added_to_cart"
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - ShopMasterDetail
|
||||
struct ShopMasterDetail: Codable {
|
||||
let id, productID: Int?
|
||||
let productNameEnglish, productNameHindi, descriptionEnglish, descriptionHindi: String?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case id
|
||||
case productID = "product_id"
|
||||
case productNameEnglish = "product_name_english"
|
||||
case productNameHindi = "product_name_hindi"
|
||||
case descriptionEnglish = "description_english"
|
||||
case descriptionHindi = "description_hindi"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
129
WOKA/Shop/Model/ShopProductsListingDM.swift
Normal file
129
WOKA/Shop/Model/ShopProductsListingDM.swift
Normal file
@@ -0,0 +1,129 @@
|
||||
//
|
||||
// ShopProductsListingDM.swift
|
||||
// WOKA
|
||||
//
|
||||
// Created by MacBook Pro on 22/07/24.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
// MARK: - ShopProductsListingDM
|
||||
struct ShopProductsListingDM: Codable {
|
||||
let result: [ResultData]?
|
||||
let totalRecords: Int?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case result
|
||||
case totalRecords = "total_records"
|
||||
}
|
||||
|
||||
// MARK: - Result
|
||||
struct ResultData: Codable {
|
||||
let id: Int?
|
||||
let skuID, productName, productThumbnail: String?
|
||||
let categoryMasterID, subCategoryMasterID: Int?
|
||||
let productPrice: String?
|
||||
let remainStockQuantity: Int?
|
||||
let stockStatus: String?
|
||||
// let taxCategory: JSONNull?
|
||||
let taxValue: String?
|
||||
let shopMasterDetail: ShopMasterDetail?
|
||||
let shopImage: [String]?
|
||||
let addedToCart: Bool?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case id
|
||||
case skuID = "sku_id"
|
||||
case productName = "product_name"
|
||||
case productThumbnail = "product_thumbnail"
|
||||
case categoryMasterID = "category_master_id"
|
||||
case subCategoryMasterID = "sub_category_master_id"
|
||||
case productPrice = "product_price"
|
||||
case remainStockQuantity = "remain_stock_quantity"
|
||||
case stockStatus = "stock_status"
|
||||
// case taxCategory = "tax_category"
|
||||
case taxValue = "tax_value"
|
||||
case shopMasterDetail = "shop_master_detail"
|
||||
case shopImage = "shop_image"
|
||||
case addedToCart = "added_to_cart"
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - ShopMasterDetail
|
||||
struct ShopMasterDetail: Codable {
|
||||
let id, productID: Int?
|
||||
let productNameEnglish, productNameHindi, descriptionEnglish, descriptionHindi: String?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case id
|
||||
case productID = "product_id"
|
||||
case productNameEnglish = "product_name_english"
|
||||
case productNameHindi = "product_name_hindi"
|
||||
case descriptionEnglish = "description_english"
|
||||
case descriptionHindi = "description_hindi"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//struct ShopProductDM: Codable {
|
||||
// let result: ResultData?
|
||||
//
|
||||
// // MARK: - ResultData
|
||||
// struct ResultData: Codable {
|
||||
// let sabakDegiNaniSeries: [SabakDegiNaniSery]?
|
||||
//
|
||||
// enum CodingKeys: String, CodingKey {
|
||||
// case sabakDegiNaniSeries = "Sabak Degi Nani Series"
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // MARK: - SabakDegiNaniSery
|
||||
// struct SabakDegiNaniSery: Codable {
|
||||
// let id: Int?
|
||||
// let skuID, productName, productThumbnail: String?
|
||||
// let categoryMasterID, subCategoryMasterID: Int?
|
||||
// let productPrice: String?
|
||||
// let remainStockQuantity: Int?
|
||||
// let stockStatus: String?
|
||||
//// let taxCategory: JSONNull?
|
||||
// let taxValue: String?
|
||||
// let shopMasterDetail: ShopMasterDetail?
|
||||
// let shopImage: [String]?
|
||||
// let addedToCart: Bool?
|
||||
//
|
||||
// enum CodingKeys: String, CodingKey {
|
||||
// case id
|
||||
// case skuID = "sku_id"
|
||||
// case productName = "product_name"
|
||||
// case productThumbnail = "product_thumbnail"
|
||||
// case categoryMasterID = "category_master_id"
|
||||
// case subCategoryMasterID = "sub_category_master_id"
|
||||
// case productPrice = "product_price"
|
||||
// case remainStockQuantity = "remain_stock_quantity"
|
||||
// case stockStatus = "stock_status"
|
||||
//// case taxCategory = "tax_category"
|
||||
// case taxValue = "tax_value"
|
||||
// case shopMasterDetail = "shop_master_detail"
|
||||
// case shopImage = "shop_image"
|
||||
// case addedToCart = "added_to_cart"
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // MARK: - ShopMasterDetail
|
||||
// struct ShopMasterDetail: Codable {
|
||||
// let id, productID: Int?
|
||||
// let productNameEnglish, productNameHindi, descriptionEnglish, descriptionHindi: String?
|
||||
//
|
||||
// enum CodingKeys: String, CodingKey {
|
||||
// case id
|
||||
// case productID = "product_id"
|
||||
// case productNameEnglish = "product_name_english"
|
||||
// case productNameHindi = "product_name_hindi"
|
||||
// case descriptionEnglish = "description_english"
|
||||
// case descriptionHindi = "description_hindi"
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//}
|
||||
//
|
||||
@@ -4,10 +4,19 @@
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
|
||||
<capability name="Named colors" minToolsVersion="9.0"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<customFonts key="customFonts">
|
||||
<array key="Exo2-Bold.ttf">
|
||||
<string>Exo2-Bold</string>
|
||||
</array>
|
||||
<array key="Exo2-Regular.ttf">
|
||||
<string>Exo2-Regular</string>
|
||||
</array>
|
||||
</customFonts>
|
||||
<scenes>
|
||||
<!--Shop ListingVC-->
|
||||
<scene sceneID="s0d-6b-0kx">
|
||||
@@ -101,6 +110,10 @@
|
||||
<rect key="frame" x="0.0" y="59" width="393" height="793"/>
|
||||
<color key="backgroundColor" red="0.82745098039999998" green="0.93725490199999995" blue="0.97254901959999995" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</view>
|
||||
<activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" style="medium" translatesAutoresizingMaskIntoConstraints="NO" id="Q7V-p9-fqq">
|
||||
<rect key="frame" x="186.66666666666666" y="798" width="20" height="20"/>
|
||||
<color key="color" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</activityIndicatorView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="OrderBottom" translatesAutoresizingMaskIntoConstraints="NO" id="03T-HE-97c">
|
||||
<rect key="frame" x="0.0" y="557.33333333333337" width="393" height="294.66666666666663"/>
|
||||
</imageView>
|
||||
@@ -119,9 +132,9 @@
|
||||
<cells/>
|
||||
</collectionView>
|
||||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="qrc-nF-3bM">
|
||||
<rect key="frame" x="0.0" y="144" width="393" height="708"/>
|
||||
<rect key="frame" x="0.0" y="144" width="393" height="654"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" automaticEstimatedItemSize="YES" minimumLineSpacing="10" minimumInteritemSpacing="10" id="Akd-Zt-0d3">
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="Akd-Zt-0d3">
|
||||
<size key="itemSize" width="128" height="128"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||
@@ -134,8 +147,11 @@
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<constraints>
|
||||
<constraint firstItem="03T-HE-97c" firstAttribute="leading" secondItem="EEU-2F-lPA" secondAttribute="leading" id="CpK-v3-Qcu"/>
|
||||
<constraint firstItem="Q7V-p9-fqq" firstAttribute="top" secondItem="qrc-nF-3bM" secondAttribute="bottom" id="HWr-qX-XVw"/>
|
||||
<constraint firstItem="EEU-2F-lPA" firstAttribute="bottom" secondItem="Q7V-p9-fqq" secondAttribute="bottom" id="PNe-VO-dMU"/>
|
||||
<constraint firstItem="Fdg-SY-oNd" firstAttribute="top" secondItem="EEU-2F-lPA" secondAttribute="top" id="SpN-9a-czs"/>
|
||||
<constraint firstItem="EEU-2F-lPA" firstAttribute="trailing" secondItem="Fdg-SY-oNd" secondAttribute="trailing" id="W91-7B-A8x"/>
|
||||
<constraint firstItem="Q7V-p9-fqq" firstAttribute="centerX" secondItem="EEU-2F-lPA" secondAttribute="centerX" id="dxD-a5-NbF"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Fdg-SY-oNd" secondAttribute="bottom" id="ftY-Br-VBe"/>
|
||||
<constraint firstItem="ibd-Ky-5QZ" firstAttribute="leading" secondItem="EEU-2F-lPA" secondAttribute="leading" constant="10" id="gOk-Il-uBj"/>
|
||||
<constraint firstItem="ibd-Ky-5QZ" firstAttribute="top" secondItem="EEU-2F-lPA" secondAttribute="top" constant="10" id="gvR-Eu-UvL"/>
|
||||
@@ -146,21 +162,207 @@
|
||||
<constraint firstItem="EEU-2F-lPA" firstAttribute="trailing" secondItem="ibd-Ky-5QZ" secondAttribute="trailing" id="uiq-HX-kWV"/>
|
||||
<constraint firstItem="qrc-nF-3bM" firstAttribute="leading" secondItem="EEU-2F-lPA" secondAttribute="leading" id="uux-x1-sEU"/>
|
||||
<constraint firstAttribute="bottom" secondItem="03T-HE-97c" secondAttribute="bottom" id="wMq-xo-NyQ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="qrc-nF-3bM" secondAttribute="bottom" id="xt2-CW-1ye"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="productCV" destination="qrc-nF-3bM" id="0dx-wj-O2z"/>
|
||||
<outlet property="spinnerView" destination="Q7V-p9-fqq" id="34Z-yw-ohr"/>
|
||||
<outlet property="subCategoryCV" destination="ibd-Ky-5QZ" id="0j8-y0-HeP"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="P44-mc-g6G" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="445" y="-45"/>
|
||||
<point key="canvasLocation" x="503" y="-35"/>
|
||||
</scene>
|
||||
<!--Product DetailsVC-->
|
||||
<scene sceneID="xRv-dP-yoU">
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="ProductDetailsVC" id="50W-Kn-pPe" customClass="ProductDetailsVC" customModule="WOKA" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="NNP-0A-zEH">
|
||||
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Sf0-tQ-I1Z">
|
||||
<rect key="frame" x="0.0" y="59" width="393" height="793"/>
|
||||
<color key="backgroundColor" red="0.82745098039999998" green="0.93725490199999995" blue="0.97254901959999995" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</view>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="OrderBottom" translatesAutoresizingMaskIntoConstraints="NO" id="11o-Wz-oVy">
|
||||
<rect key="frame" x="0.0" y="557.33333333333337" width="393" height="294.66666666666663"/>
|
||||
</imageView>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wxy-J9-S7w">
|
||||
<rect key="frame" x="0.0" y="59" width="393" height="759"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="14" translatesAutoresizingMaskIntoConstraints="NO" id="2Hi-i7-d5A">
|
||||
<rect key="frame" x="0.0" y="0.0" width="393" height="422"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="..." lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xon-3Q-PPf">
|
||||
<rect key="frame" x="10" y="8.0000000000000018" width="373" height="20.666666666666671"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="17"/>
|
||||
<color key="textColor" red="0.1058823529" green="0.050980392159999999" blue="0.60392156860000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7cG-sy-354">
|
||||
<rect key="frame" x="10" y="42.666666666666671" width="373" height="170"/>
|
||||
<subviews>
|
||||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="rPD-8U-l3M">
|
||||
<rect key="frame" x="0.0" y="5" width="373" height="160"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="160" id="acB-Ao-X6i"/>
|
||||
</constraints>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="10" minimumInteritemSpacing="10" id="rkS-de-CYx">
|
||||
<size key="itemSize" width="128" height="128"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
</collectionViewFlowLayout>
|
||||
<cells/>
|
||||
</collectionView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="rPD-8U-l3M" secondAttribute="bottom" constant="5" id="5SL-5D-5Xu"/>
|
||||
<constraint firstItem="rPD-8U-l3M" firstAttribute="top" secondItem="7cG-sy-354" secondAttribute="top" constant="5" id="Tzj-lY-qPr"/>
|
||||
<constraint firstAttribute="trailing" secondItem="rPD-8U-l3M" secondAttribute="trailing" id="o4S-Vm-U7K"/>
|
||||
<constraint firstAttribute="height" constant="170" id="qnS-5J-e8i"/>
|
||||
<constraint firstItem="rPD-8U-l3M" firstAttribute="leading" secondItem="7cG-sy-354" secondAttribute="leading" id="xW3-6j-wVO"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<pageControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" numberOfPages="1" translatesAutoresizingMaskIntoConstraints="NO" id="S11-hP-BvF">
|
||||
<rect key="frame" x="10" y="226.66666666666669" width="373" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="G9o-M3-8XF"/>
|
||||
</constraints>
|
||||
<color key="pageIndicatorTintColor" red="0.59309977110000001" green="0.6003752282" blue="0.93852707150000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="currentPageIndicatorTintColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<connections>
|
||||
<action selector="pageControl:" destination="50W-Kn-pPe" eventType="valueChanged" id="Ps7-Ww-41b"/>
|
||||
</connections>
|
||||
</pageControl>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" alignment="top" translatesAutoresizingMaskIntoConstraints="NO" id="Ga1-SD-5g9">
|
||||
<rect key="frame" x="10" y="280.66666666666669" width="373" height="20.666666666666686"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="Category Name : " lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Gtr-uO-GrV">
|
||||
<rect key="frame" x="0.0" y="0.0" width="134.66666666666666" height="20.666666666666668"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="17"/>
|
||||
<color key="textColor" red="0.1058823529" green="0.050980392159999999" blue="0.60392156860000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pXa-BI-1Vq">
|
||||
<rect key="frame" x="134.66666666666663" y="0.0" width="238.33333333333337" height="0.0"/>
|
||||
<color key="textColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" alignment="top" translatesAutoresizingMaskIntoConstraints="NO" id="bzO-5h-yjp">
|
||||
<rect key="frame" x="10" y="315.33333333333331" width="373" height="20.666666666666686"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="SKU ID : " lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zDK-3H-b6X">
|
||||
<rect key="frame" x="0.0" y="0.0" width="64.666666666666671" height="20.666666666666668"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="17"/>
|
||||
<color key="textColor" red="0.1058823529" green="0.050980392159999999" blue="0.60392156860000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iAp-gN-dq2">
|
||||
<rect key="frame" x="64.666666666666657" y="0.0" width="308.33333333333337" height="0.0"/>
|
||||
<color key="textColor" name="ImageDarkBlue"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="cuo-VT-f35">
|
||||
<rect key="frame" x="10" y="350" width="373" height="50"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="Rs. 0 " lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wA2-Vl-eLw">
|
||||
<rect key="frame" x="0.0" y="14.666666666666687" width="223" height="20.666666666666671"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="17"/>
|
||||
<color key="textColor" red="0.1058823529" green="0.050980392159999999" blue="0.60392156860000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ahD-zd-wgq" customClass="LocalisedElementsButton" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="223" y="0.0" width="150" height="50"/>
|
||||
<color key="backgroundColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="50" id="YNp-dB-bHW"/>
|
||||
<constraint firstAttribute="width" constant="150" id="kOk-ZM-auM"/>
|
||||
</constraints>
|
||||
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<state key="normal" title="Button"/>
|
||||
<buttonConfiguration key="configuration" style="plain" image="cart.fill" catalog="system" title="Add to Cart" imagePadding="5">
|
||||
<fontDescription key="titleFontDescription" name="Exo2-Medium" family="Exo 2" pointSize="16"/>
|
||||
</buttonConfiguration>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="25"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="addToCartBtnTapped:" destination="50W-Kn-pPe" eventType="touchUpInside" id="eVj-l8-LaJ"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MGf-Sz-m0H">
|
||||
<rect key="frame" x="10" y="414" width="373" height="0.0"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="17"/>
|
||||
<color key="textColor" red="0.1058823529" green="0.050980392159999999" blue="0.60392156860000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<edgeInsets key="layoutMargins" top="8" left="10" bottom="8" right="10"/>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="2Hi-i7-d5A" secondAttribute="bottom" id="9mF-gp-qig"/>
|
||||
<constraint firstItem="2Hi-i7-d5A" firstAttribute="width" secondItem="3Kq-bf-nlH" secondAttribute="width" id="E4t-bO-D9a"/>
|
||||
<constraint firstItem="2Hi-i7-d5A" firstAttribute="leading" secondItem="fDN-IE-ujI" secondAttribute="leading" id="Qc8-PA-ErK"/>
|
||||
<constraint firstItem="fDN-IE-ujI" firstAttribute="trailing" secondItem="2Hi-i7-d5A" secondAttribute="trailing" id="iAp-oy-kPc"/>
|
||||
<constraint firstItem="2Hi-i7-d5A" firstAttribute="top" secondItem="wxy-J9-S7w" secondAttribute="top" id="rFi-wx-fQQ"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="contentLayoutGuide" id="3Kq-bf-nlH"/>
|
||||
<viewLayoutGuide key="frameLayoutGuide" id="fDN-IE-ujI"/>
|
||||
</scrollView>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="lMc-y6-eRf"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<constraints>
|
||||
<constraint firstItem="wxy-J9-S7w" firstAttribute="top" secondItem="lMc-y6-eRf" secondAttribute="top" id="0Dw-gY-fwD"/>
|
||||
<constraint firstItem="Sf0-tQ-I1Z" firstAttribute="top" secondItem="lMc-y6-eRf" secondAttribute="top" id="4eA-Ne-ylA"/>
|
||||
<constraint firstItem="11o-Wz-oVy" firstAttribute="leading" secondItem="lMc-y6-eRf" secondAttribute="leading" id="5aK-8E-8eP"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Sf0-tQ-I1Z" secondAttribute="bottom" id="6SO-op-X8q"/>
|
||||
<constraint firstItem="Sf0-tQ-I1Z" firstAttribute="leading" secondItem="lMc-y6-eRf" secondAttribute="leading" id="CvR-51-mma"/>
|
||||
<constraint firstAttribute="bottom" secondItem="11o-Wz-oVy" secondAttribute="bottom" id="IUM-Qf-wbF"/>
|
||||
<constraint firstItem="wxy-J9-S7w" firstAttribute="bottom" secondItem="lMc-y6-eRf" secondAttribute="bottom" id="Msc-lZ-XZ1"/>
|
||||
<constraint firstItem="wxy-J9-S7w" firstAttribute="trailing" secondItem="lMc-y6-eRf" secondAttribute="trailing" id="PHj-gT-GZ1"/>
|
||||
<constraint firstItem="11o-Wz-oVy" firstAttribute="trailing" secondItem="lMc-y6-eRf" secondAttribute="trailing" id="TWL-yC-bnk"/>
|
||||
<constraint firstItem="wxy-J9-S7w" firstAttribute="leading" secondItem="lMc-y6-eRf" secondAttribute="leading" id="X4E-Gc-aRw"/>
|
||||
<constraint firstItem="lMc-y6-eRf" firstAttribute="trailing" secondItem="Sf0-tQ-I1Z" secondAttribute="trailing" id="rNS-vr-yQK"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="addToCartBtn" destination="ahD-zd-wgq" id="q5Z-e2-ik2"/>
|
||||
<outlet property="categoryName" destination="pXa-BI-1Vq" id="ZOJ-87-NoN"/>
|
||||
<outlet property="pageControl" destination="S11-hP-BvF" id="TVr-VN-q6m"/>
|
||||
<outlet property="productDescription" destination="MGf-Sz-m0H" id="xXr-7b-crc"/>
|
||||
<outlet property="productImageCV" destination="rPD-8U-l3M" id="Q6T-l2-VTB"/>
|
||||
<outlet property="productPrice" destination="wA2-Vl-eLw" id="DAV-So-gfZ"/>
|
||||
<outlet property="productTitle" destination="Xon-3Q-PPf" id="txd-Sp-8eO"/>
|
||||
<outlet property="shadowView" destination="7cG-sy-354" id="05t-Pe-JYb"/>
|
||||
<outlet property="skuID" destination="iAp-gN-dq2" id="clh-vQ-jib"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="QCa-OW-pLh" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="1232.824427480916" y="-35.211267605633807"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="OrderBottom" width="570.66668701171875" height="294.66665649414062"/>
|
||||
<image name="cart.fill" catalog="system" width="128" height="102"/>
|
||||
<namedColor name="ImageDarkBlue">
|
||||
<color red="0.035000000149011612" green="0.0" blue="0.36500000953674316" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</namedColor>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
|
||||
27
WOKA/Shop/View/ShopProductImageCell.swift
Normal file
27
WOKA/Shop/View/ShopProductImageCell.swift
Normal file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// ShopProductImageCell.swift
|
||||
// WOKA
|
||||
//
|
||||
// Created by Bilal on 26/07/2024.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class ShopProductImageCell: UICollectionViewCell {
|
||||
|
||||
@IBOutlet weak var productImage: UIImageView!
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
productImage.layer.shadowRadius = 4
|
||||
productImage.layer.shadowOpacity = 0.4
|
||||
productImage.layer.shadowColor = UIColor.black.cgColor
|
||||
productImage.layer.shadowOffset = CGSize.zero
|
||||
productImage.layer.cornerRadius = 10
|
||||
productImage.generateOuterShadow()
|
||||
}
|
||||
|
||||
func setData(image : String){
|
||||
productImage.imageURL(image, color: UIColor.appColor(.TextDarkBlue)!)
|
||||
}
|
||||
}
|
||||
41
WOKA/Shop/View/ShopProductImageCell.xib
Normal file
41
WOKA/Shop/View/ShopProductImageCell.xib
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="ShopProductImageCell" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="343" height="202"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="343" height="202"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="dwf-qY-jVe">
|
||||
<rect key="frame" x="7" y="7" width="329" height="188"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
</view>
|
||||
<viewLayoutGuide key="safeArea" id="ZTg-uK-7eu"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="dwf-qY-jVe" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="7" id="0hr-Mn-vTt"/>
|
||||
<constraint firstAttribute="bottom" secondItem="dwf-qY-jVe" secondAttribute="bottom" constant="7" id="Hdk-Zj-tcl"/>
|
||||
<constraint firstItem="dwf-qY-jVe" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="7" id="a2z-kb-hWG"/>
|
||||
<constraint firstAttribute="trailing" secondItem="dwf-qY-jVe" secondAttribute="trailing" constant="7" id="loN-ZU-4KY"/>
|
||||
</constraints>
|
||||
<size key="customSize" width="343" height="202"/>
|
||||
<connections>
|
||||
<outlet property="productImage" destination="dwf-qY-jVe" id="NZb-Hw-0aC"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="304.58015267175574" y="42.253521126760567"/>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
@@ -15,14 +15,16 @@ class ShopProductsCell: UICollectionViewCell {
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
productTitle.font = FontCustom.shareInstance.customFont(fontName: .Exo2_Regular, size: 13)
|
||||
productPrice.font = FontCustom.shareInstance.customFont(fontName: .Exo2_Regular, size: 13)
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
func setData(data : ShopProductDM.SabakDegiNaniSery){
|
||||
func setData(data : ShopProductsListingDM.ResultData){
|
||||
self.productTitle.text = data.productName
|
||||
self.productPrice.text = data.productPrice
|
||||
|
||||
if let url = data.productThumbnail{
|
||||
if let url = data.shopImage?.first{
|
||||
self.productImage.imageURL(url, color: .black)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,11 +6,12 @@
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
|
||||
<capability name="Named colors" minToolsVersion="9.0"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<customFonts key="customFonts">
|
||||
<array key="Exo2-Bold.ttf">
|
||||
<string>Exo2-Bold</string>
|
||||
<array key="Exo2-Regular.ttf">
|
||||
<string>Exo2-Regular</string>
|
||||
</array>
|
||||
</customFonts>
|
||||
<objects>
|
||||
@@ -23,57 +24,67 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="167" height="167"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Card" translatesAutoresizingMaskIntoConstraints="NO" id="gxB-sF-vrU">
|
||||
<rect key="frame" x="0.0" y="0.0" width="167" height="167"/>
|
||||
</imageView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="jcb-xQ-0XB">
|
||||
<rect key="frame" x="4" y="10" width="157" height="137"/>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0Zv-2V-8m6">
|
||||
<rect key="frame" x="5" y="5" width="157" height="157"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="MasilaComingSoon" translatesAutoresizingMaskIntoConstraints="NO" id="Qxf-XT-JWX">
|
||||
<rect key="frame" x="0.0" y="0.0" width="157" height="80"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="80" id="Asx-t9-17g"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="10"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="b3X-u9-HF2">
|
||||
<rect key="frame" x="0.0" y="90" width="157" height="47"/>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="jcb-xQ-0XB">
|
||||
<rect key="frame" x="8" y="8" width="141" height="144"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5VD-VF-Ean">
|
||||
<rect key="frame" x="0.0" y="0.0" width="107.66666666666667" height="47"/>
|
||||
<string key="text">Labelsadasdasd
|
||||
sadasdasd</string>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="14"/>
|
||||
<color key="textColor" name="ImageDarkBlue"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="Rs. 110" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sNE-QZ-rn6">
|
||||
<rect key="frame" x="107.66666666666667" y="0.0" width="49.333333333333329" height="47"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="10"/>
|
||||
<color key="textColor" name="ImageDarkBlue"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Qxf-XT-JWX">
|
||||
<rect key="frame" x="0.0" y="0.0" width="141" height="90"/>
|
||||
<color key="backgroundColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="90" id="Asx-t9-17g"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="10"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="b3X-u9-HF2">
|
||||
<rect key="frame" x="0.0" y="95" width="141" height="49"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5VD-VF-Ean">
|
||||
<rect key="frame" x="0.0" y="0.0" width="95.666666666666671" height="49"/>
|
||||
<string key="text">sadasdasd
|
||||
sadasdasd
|
||||
sadasdasdasdsad</string>
|
||||
<color key="textColor" red="0.1058823529" green="0.050980392159999999" blue="0.60392156860000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="251" text="Rs. 000" textAlignment="right" lineBreakMode="wordWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sNE-QZ-rn6">
|
||||
<rect key="frame" x="100.66666666666667" y="0.0" width="40.333333333333329" height="49"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="10"/>
|
||||
<color key="textColor" name="ImageDarkBlue"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</stackView>
|
||||
</subviews>
|
||||
</stackView>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<constraints>
|
||||
<constraint firstItem="jcb-xQ-0XB" firstAttribute="top" secondItem="0Zv-2V-8m6" secondAttribute="top" constant="8" id="7Om-r2-DV5"/>
|
||||
<constraint firstAttribute="trailing" secondItem="jcb-xQ-0XB" secondAttribute="trailing" constant="8" id="FVq-nY-fD7"/>
|
||||
<constraint firstItem="jcb-xQ-0XB" firstAttribute="leading" secondItem="0Zv-2V-8m6" secondAttribute="leading" constant="8" id="JaZ-Dw-2aK"/>
|
||||
<constraint firstAttribute="bottom" secondItem="jcb-xQ-0XB" secondAttribute="bottom" constant="5" id="bYI-Ld-y19"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="10"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
</view>
|
||||
<viewLayoutGuide key="safeArea" id="ZTg-uK-7eu"/>
|
||||
<constraints>
|
||||
<constraint firstItem="jcb-xQ-0XB" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="10" id="6ez-E9-5MV"/>
|
||||
<constraint firstAttribute="trailing" secondItem="gxB-sF-vrU" secondAttribute="trailing" id="Q50-fw-aNj"/>
|
||||
<constraint firstAttribute="bottom" secondItem="gxB-sF-vrU" secondAttribute="bottom" id="QmC-1D-OIq"/>
|
||||
<constraint firstAttribute="bottom" secondItem="jcb-xQ-0XB" secondAttribute="bottom" constant="20" id="aLr-99-xbT"/>
|
||||
<constraint firstItem="gxB-sF-vrU" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="dHy-Vn-aaJ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="jcb-xQ-0XB" secondAttribute="trailing" constant="6" id="fdk-Wc-0SS"/>
|
||||
<constraint firstItem="jcb-xQ-0XB" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="4" id="g2Z-Py-Pfn"/>
|
||||
<constraint firstItem="gxB-sF-vrU" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="zs4-bk-oMq"/>
|
||||
<constraint firstItem="0Zv-2V-8m6" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="5" id="85n-7X-ZTI"/>
|
||||
<constraint firstItem="0Zv-2V-8m6" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="5" id="Lnz-DC-06d"/>
|
||||
<constraint firstAttribute="bottom" secondItem="0Zv-2V-8m6" secondAttribute="bottom" constant="5" id="Pic-Q0-CID"/>
|
||||
<constraint firstAttribute="trailing" secondItem="0Zv-2V-8m6" secondAttribute="trailing" constant="5" id="oer-Xb-KMF"/>
|
||||
</constraints>
|
||||
<size key="customSize" width="167" height="167"/>
|
||||
<connections>
|
||||
@@ -85,10 +96,11 @@ sadasdasd</string>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="Card" width="273.33334350585938" height="250.66667175292969"/>
|
||||
<image name="MasilaComingSoon" width="200" height="100"/>
|
||||
<namedColor name="ImageDarkBlue">
|
||||
<color red="0.035000000149011612" green="0.0" blue="0.36500000953674316" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</namedColor>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
61
WOKA/Shop/ViewModel/ProductDetailsVM.swift
Normal file
61
WOKA/Shop/ViewModel/ProductDetailsVM.swift
Normal file
@@ -0,0 +1,61 @@
|
||||
//
|
||||
// ProductDetailsVM.swift
|
||||
// WOKA
|
||||
//
|
||||
// Created by Bilal on 26/07/2024.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class ProductDetailsVM{
|
||||
|
||||
weak var vc : ProductDetailsVC!
|
||||
|
||||
var productDetails : ShopProductsListingDM.ResultData?
|
||||
var categoryName = "NA"
|
||||
|
||||
func initView(){
|
||||
addGradient()
|
||||
setupCell()
|
||||
// vc.productImageCV.roundCorner(radius: 10)
|
||||
//
|
||||
// vc.productImageCV.addBorderView(width: 0.5, color: #colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1))
|
||||
|
||||
|
||||
//set details
|
||||
if let productDetails{
|
||||
vc.productTitle.text = productDetails.productName
|
||||
vc.categoryName.text = categoryName
|
||||
vc.skuID.text = productDetails.skuID
|
||||
vc.productPrice.text = productDetails.productPrice
|
||||
|
||||
if let desc = productDetails.shopMasterDetail?.descriptionEnglish, let htmlText = desc.replacingOccurrences(of: "<br>", with: "").htmlToAttributedString{
|
||||
let sizeText = NSMutableAttributedString(attributedString: htmlText)
|
||||
sizeText.setFontFace(font: FontCustom.shareInstance.customFont(fontName: .Exo2_Regular, size: 16),color: UIColor.appColor(.TextDarkBlue)!)
|
||||
vc.productDescription.attributedText = sizeText
|
||||
}
|
||||
|
||||
vc.pageControl.numberOfPages = productDetails.shopImage?.count ?? 1
|
||||
vc.pageControl.currentPage = 0
|
||||
if let addedToCart = productDetails.addedToCart, addedToCart{
|
||||
vc.addToCartBtn.setTitle("View Cart", for: .normal)
|
||||
}else{
|
||||
vc.addToCartBtn.setTitle("Add to Cart", for: .normal)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func setupCell(){
|
||||
vc.productImageCV.register(UINib(nibName: K.CellIdentifier.Shop.shopProductImageCell, bundle: nil), forCellWithReuseIdentifier: K.CellIdentifier.Shop.shopProductImageCell)
|
||||
vc.productImageCV.delegate = vc.self
|
||||
vc.productImageCV.dataSource = vc.self
|
||||
}
|
||||
|
||||
func addGradient(){
|
||||
let color1 = #colorLiteral(red: 0.6745098039, green: 0.6235294118, blue: 0.1725490196, alpha: 1)
|
||||
let color2 = #colorLiteral(red: 0.5450980392, green: 0.6745098039, blue: 0.1725490196, alpha: 1)
|
||||
self.vc.title = "SHOP".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
|
||||
self.vc.view.applyGradient(colors: [color2, color1], startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0.8, y: 0))
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,12 +12,15 @@ class ShopProductsVM{
|
||||
|
||||
weak var vc : ShopProductsVC!
|
||||
var subCategoryData = [ShopSubCategoryDM.ResultData]()
|
||||
var shopProductsData = [ShopProductDM.SabakDegiNaniSery]()
|
||||
|
||||
var shopProductsData = [ShopProductsListingDM.ResultData]()
|
||||
|
||||
var categoryID : Int?
|
||||
var selectedSubCategory = 0
|
||||
var pageTitle : String?
|
||||
|
||||
var pageNo = 0
|
||||
var stopFetch = false
|
||||
|
||||
func initView(){
|
||||
getCategory()
|
||||
addGradient()
|
||||
@@ -75,6 +78,7 @@ class ShopProductsVM{
|
||||
self.selectedSubCategory = data.first?.id ?? 0
|
||||
self.vc.subCategoryCV.reloadData()
|
||||
if let subCatID = data.first?.id{
|
||||
Utilities.startProgressHUD()
|
||||
self.getShopProducts(subCategoryID: subCatID)
|
||||
}
|
||||
default:
|
||||
@@ -98,12 +102,14 @@ class ShopProductsVM{
|
||||
|
||||
func getShopProducts(subCategoryID : Int?){
|
||||
guard let categoryID else{return}
|
||||
Utilities.startProgressHUD()
|
||||
let headers : HTTPHeaders = ["access-token" : AuthFunc.shareInstance.getAccessToken()]
|
||||
let params : Parameters = ["category_id" : categoryID,
|
||||
"sub_category_id" : subCategoryID ?? ""]
|
||||
"sub_category_id" : subCategoryID ?? "",
|
||||
"api_version" : "v2",
|
||||
"start" : pageNo,
|
||||
"limit" : 12]
|
||||
|
||||
NetworkManager.shareInstance.apiRequest(url: APIEndPoints.Shop.shop_product_listing, method: .post,parameters: params,headers: headers) { [weak self](result : Result<BaseResponseModel<ShopProductDM>, NetworkManager.APIError>) in
|
||||
NetworkManager.shareInstance.apiRequest(url: APIEndPoints.Shop.shop_product_listing_v2, method: .post,parameters: params,headers: headers) { [weak self](result : Result<BaseResponseModel<ShopProductsListingDM>, NetworkManager.APIError>) in
|
||||
switch result{
|
||||
case .success(let data):
|
||||
guard let self else{
|
||||
@@ -116,6 +122,8 @@ class ShopProductsVM{
|
||||
Error
|
||||
*/
|
||||
Utilities.dismissProgressHUD()
|
||||
vc.spinnerView.stopAnimating()
|
||||
if stopFetch == true { return}
|
||||
Utilities.alertWithBtnCompletion(title: "Error", msgBody: data.message ?? K.ConstantString.unRecognised, okBtnStr: "Retry?", vc: self.vc) { isDone in
|
||||
if isDone{
|
||||
self.getShopProducts(subCategoryID: subCategoryID)
|
||||
@@ -123,20 +131,26 @@ class ShopProductsVM{
|
||||
}
|
||||
case 1:
|
||||
Utilities.dismissProgressHUD()
|
||||
guard let data = data.data?.result?.sabakDegiNaniSeries else{return}
|
||||
self.shopProductsData = data
|
||||
vc.spinnerView.stopAnimating()
|
||||
guard let count = data.data?.totalRecords ,let data = data.data?.result else{return}
|
||||
self.shopProductsData.append(contentsOf: data)
|
||||
self.vc.productCV.reloadData()
|
||||
print(data)
|
||||
if self.shopProductsData.count == count{
|
||||
stopFetch = true
|
||||
}
|
||||
default:
|
||||
Utilities.dismissProgressHUD()
|
||||
vc.spinnerView.stopAnimating()
|
||||
break
|
||||
}
|
||||
case .failure(let error):
|
||||
guard let self else{
|
||||
Utilities.dismissProgressHUD()
|
||||
self?.vc.spinnerView.stopAnimating()
|
||||
return
|
||||
}
|
||||
Utilities.dismissProgressHUD()
|
||||
vc.spinnerView.stopAnimating()
|
||||
Utilities.alertWithBtnCompletion(title: "Error", msgBody: error.localizedDescription, okBtnStr: "Retry?", vc: self.vc) { isDone in
|
||||
// if isDone{
|
||||
// self.getCategory()
|
||||
@@ -146,3 +160,29 @@ class ShopProductsVM{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class FooterSpinnerView: UICollectionReusableView {
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
setupSpinner()
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
private func setupSpinner() {
|
||||
let spinner = UIActivityIndicatorView(style: .medium)
|
||||
spinner.translatesAutoresizingMaskIntoConstraints = false
|
||||
spinner.startAnimating()
|
||||
spinner.hidesWhenStopped = true
|
||||
spinner.color = UIColor.appColor(.TextDarkBlue)!
|
||||
addSubview(spinner)
|
||||
|
||||
NSLayoutConstraint.activate([
|
||||
spinner.centerXAnchor.constraint(equalTo: centerXAnchor),
|
||||
spinner.centerYAnchor.constraint(equalTo: centerYAnchor)
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -629,7 +629,7 @@
|
||||
<wkPreferences key="preferences"/>
|
||||
</wkWebViewConfiguration>
|
||||
</wkWebView>
|
||||
<textView hidden="YES" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" usesAttributedText="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Us0-ed-0Kh">
|
||||
<textView hidden="YES" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" indicatorStyle="white" editable="NO" usesAttributedText="YES" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Us0-ed-0Kh">
|
||||
<rect key="frame" x="0.0" y="48" width="414" height="814"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<attributedString key="attributedText"/>
|
||||
@@ -687,16 +687,16 @@
|
||||
</scenes>
|
||||
<designables>
|
||||
<designable name="arD-av-w7V">
|
||||
<size key="intrinsicContentSize" width="169.5" height="21"/>
|
||||
<size key="intrinsicContentSize" width="119.5" height="21"/>
|
||||
</designable>
|
||||
<designable name="fZS-d6-t0h">
|
||||
<size key="intrinsicContentSize" width="169" height="21"/>
|
||||
<size key="intrinsicContentSize" width="119" height="21"/>
|
||||
</designable>
|
||||
<designable name="fiK-Gg-JDj">
|
||||
<size key="intrinsicContentSize" width="169.5" height="21"/>
|
||||
<size key="intrinsicContentSize" width="119.5" height="21"/>
|
||||
</designable>
|
||||
<designable name="zMI-2r-pRQ">
|
||||
<size key="intrinsicContentSize" width="169" height="21"/>
|
||||
<size key="intrinsicContentSize" width="119" height="21"/>
|
||||
</designable>
|
||||
</designables>
|
||||
<resources>
|
||||
|
||||
@@ -33,6 +33,7 @@ class SideMenuVC: UIViewController {
|
||||
@IBOutlet weak var termsConditionBtn: UIButton!
|
||||
@IBOutlet weak var privacyPolicyBtn: UIButton!
|
||||
@IBOutlet weak var disclaimerBtn: UIButton!
|
||||
@IBOutlet weak var appVersion: UILabel!
|
||||
|
||||
@IBOutlet weak var avatarImage: UIImageView!
|
||||
@IBOutlet weak var scrollView: UIScrollView!
|
||||
@@ -63,6 +64,7 @@ class SideMenuVC: UIViewController {
|
||||
NotificationCenter.default.post(name: .linkPush, object: nil, userInfo: ["type": LinkTypeEnum.faq])
|
||||
case wokaSupportBtn:
|
||||
self.sideMenuController?.hideMenu()
|
||||
if AuthFunc.shareInstance.guestUserLoginPopUp() { return}
|
||||
NotificationCenter.default.post(name: .linkPush, object: nil, userInfo: ["type": LinkTypeEnum.support])
|
||||
case profileBtn:
|
||||
self.sideMenuController?.hideMenu()
|
||||
|
||||
@@ -14,7 +14,7 @@ class SideMenuVM{
|
||||
|
||||
func initView(){
|
||||
AuthFunc.shareInstance.getDefaultLanguage() == .english ? (vc.languageControl.selectedSegmentIndex = 0) : (vc.languageControl.selectedSegmentIndex = 1)
|
||||
|
||||
vc.appVersion.text = "VER: \(Bundle.main.appVersionLong) (\(Bundle.main.appBuild))"
|
||||
customizeSegmentControl()
|
||||
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)
|
||||
|
||||
@@ -556,16 +556,16 @@
|
||||
</constraints>
|
||||
</view>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="U0W-18-4oe">
|
||||
<rect key="frame" x="0.0" y="45" width="393" height="224"/>
|
||||
<rect key="frame" x="0.0" y="45" width="393" height="222"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Coming Soon on WOKA" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="D2p-c5-usH" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="10" y="10" width="373" height="24"/>
|
||||
<rect key="frame" x="10" y="10" width="373" height="22"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="20"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UKc-92-GPa">
|
||||
<rect key="frame" x="10" y="44" width="373" height="180"/>
|
||||
<rect key="frame" x="10" y="42" width="373" height="180"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="MasilaComingSoon" translatesAutoresizingMaskIntoConstraints="NO" id="Kj9-jH-Y88">
|
||||
<rect key="frame" x="7" y="7" width="359" height="140"/>
|
||||
@@ -633,7 +633,7 @@
|
||||
<edgeInsets key="layoutMargins" top="10" left="10" bottom="0.0" right="10"/>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="Qcq-yj-AzB">
|
||||
<rect key="frame" x="0.0" y="269" width="393" height="209"/>
|
||||
<rect key="frame" x="0.0" y="267" width="393" height="209"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="BLOGS" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lW0-W4-2hl" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="10" y="10" width="373" height="24"/>
|
||||
@@ -659,7 +659,7 @@
|
||||
<edgeInsets key="layoutMargins" top="10" left="10" bottom="0.0" right="10"/>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="pJu-fq-XmG">
|
||||
<rect key="frame" x="0.0" y="478" width="393" height="266"/>
|
||||
<rect key="frame" x="0.0" y="476" width="393" height="268"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="WOKA Songs" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FSJ-QT-rAW" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="10" y="10" width="373" height="24"/>
|
||||
@@ -668,7 +668,7 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="31Z-fz-1ec">
|
||||
<rect key="frame" x="10" y="44" width="373" height="222"/>
|
||||
<rect key="frame" x="10" y="44" width="373" height="224"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tableView>
|
||||
</subviews>
|
||||
@@ -995,7 +995,7 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dli-ld-4dd">
|
||||
<rect key="frame" x="15" y="74" width="30" height="30"/>
|
||||
<rect key="frame" x="40" y="79" width="30" height="30"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="30" id="HPJ-GV-z0x"/>
|
||||
@@ -1017,8 +1017,8 @@
|
||||
<viewLayoutGuide key="safeArea" id="2gp-j2-aWC"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="dli-ld-4dd" firstAttribute="top" secondItem="2gp-j2-aWC" secondAttribute="top" constant="15" id="WZP-PS-eKd"/>
|
||||
<constraint firstItem="dli-ld-4dd" firstAttribute="leading" secondItem="2gp-j2-aWC" secondAttribute="leading" constant="15" id="jRV-6s-U6h"/>
|
||||
<constraint firstItem="dli-ld-4dd" firstAttribute="top" secondItem="2gp-j2-aWC" secondAttribute="top" constant="20" id="WZP-PS-eKd"/>
|
||||
<constraint firstItem="dli-ld-4dd" firstAttribute="leading" secondItem="2gp-j2-aWC" secondAttribute="leading" constant="40" id="jRV-6s-U6h"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
@@ -1171,7 +1171,7 @@
|
||||
</label>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" usesAttributedText="YES" translatesAutoresizingMaskIntoConstraints="NO" id="2tU-Z6-Wgy">
|
||||
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" editable="NO" usesAttributedText="YES" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2tU-Z6-Wgy">
|
||||
<rect key="frame" x="15" y="189.33333333333337" width="323" height="236.66666666666663"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<attributedString key="attributedText"/>
|
||||
@@ -1249,10 +1249,10 @@
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
<systemColor name="systemBrownColor">
|
||||
<color red="0.63529411759999999" green="0.51764705879999995" blue="0.36862745099999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color red="0.63529411764705879" green="0.51764705882352946" blue="0.36862745098039218" 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>
|
||||
|
||||
@@ -19,35 +19,38 @@ class PlayerVC: JWPlayerViewController, JWPlayerViewControllerDelegate {
|
||||
var config: JWPlayerConfiguration!
|
||||
var dismissTapped: (() -> Void)?
|
||||
var videoIndex : Int?
|
||||
|
||||
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
|
||||
return .allButUpsideDown
|
||||
|
||||
override var prefersStatusBarHidden: Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func rotateToLandsScapeDevice(){
|
||||
let appDelegate = UIApplication.shared.delegate as! AppDelegate
|
||||
appDelegate.myOrientation = .landscapeRight
|
||||
if #available(iOS 16.0, *) {
|
||||
let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene
|
||||
windowScene?.requestGeometryUpdate(.iOS(interfaceOrientations: UIInterfaceOrientationMask.landscapeRight))
|
||||
} else {
|
||||
UIDevice.current.setValue(UIInterfaceOrientationMask.landscapeRight.rawValue, forKey: "orientation")
|
||||
}
|
||||
UIView.setAnimationsEnabled(true)
|
||||
}
|
||||
|
||||
func rotateToPortraitScapeDevice(){
|
||||
let appDelegate = UIApplication.shared.delegate as! AppDelegate
|
||||
appDelegate.myOrientation = .portrait
|
||||
if #available(iOS 16.0, *) {
|
||||
let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene
|
||||
windowScene?.requestGeometryUpdate(.iOS(interfaceOrientations: UIInterfaceOrientationMask.portrait))
|
||||
} else {
|
||||
UIDevice.current.setValue(UIInterfaceOrientationMask.portrait.rawValue, forKey: "orientation")
|
||||
}
|
||||
// UIDevice.current.setValue(UIInterfaceOrientation.portrait.rawValue, forKey: "orientation")
|
||||
UIView.setAnimationsEnabled(true)
|
||||
}
|
||||
// func rotateToLandsScapeDevice(){
|
||||
// let appDelegate = UIApplication.shared.delegate as! AppDelegate
|
||||
// appDelegate.myOrientation = .landscapeRight
|
||||
// if #available(iOS 16.0, *) {
|
||||
//// let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene
|
||||
// appDelegate.window?.windowScene?.requestGeometryUpdate(.iOS(interfaceOrientations: UIInterfaceOrientationMask.landscapeRight), errorHandler: { error in
|
||||
// print(error)
|
||||
// })
|
||||
// } else {
|
||||
// UIDevice.current.setValue(UIInterfaceOrientationMask.landscapeRight.rawValue, forKey: "orientation")
|
||||
// }
|
||||
// UIView.setAnimationsEnabled(true)
|
||||
// }
|
||||
//
|
||||
// func rotateToPortraitScapeDevice(){
|
||||
// let appDelegate = UIApplication.shared.delegate as! AppDelegate
|
||||
// appDelegate.myOrientation = .portrait
|
||||
// if #available(iOS 16.0, *) {
|
||||
// let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene
|
||||
// windowScene?.requestGeometryUpdate(.iOS(interfaceOrientations: UIInterfaceOrientationMask.portrait), errorHandler: { error in
|
||||
// print(error)
|
||||
// })
|
||||
// } else {
|
||||
// UIDevice.current.setValue(UIInterfaceOrientationMask.portrait.rawValue, forKey: "orientation")
|
||||
// }
|
||||
// UIView.setAnimationsEnabled(true)
|
||||
// }
|
||||
|
||||
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
|
||||
super.viewWillTransition(to: size, with: coordinator)
|
||||
@@ -61,30 +64,20 @@ class PlayerVC: JWPlayerViewController, JWPlayerViewControllerDelegate {
|
||||
}
|
||||
}
|
||||
}
|
||||
// func rotateToPortraitScapeDevice() {
|
||||
// let appDelegate = UIApplication.shared.delegate as! AppDelegate
|
||||
// appDelegate.myOrientation = .portrait
|
||||
//
|
||||
// UIView.animate(withDuration: 0.3) {
|
||||
// if #available(iOS 16.0, *) {
|
||||
// let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene
|
||||
// windowScene?.requestGeometryUpdate(.iOS(interfaceOrientations: .portrait)) { error in
|
||||
// print("Error updating geometry: \(error.localizedDescription)")
|
||||
// }
|
||||
// } else {
|
||||
// UIDevice.current.setValue(UIInterfaceOrientation.portrait.rawValue, forKey: "orientation")
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
self.rotateToLandsScapeDevice()
|
||||
// self.rotateToLandsScapeDevice()
|
||||
rotateView(to: .pi / 2) // Example: 90 degrees rotation
|
||||
self.view.bringSubviewToFront(backButton)
|
||||
}
|
||||
|
||||
func rotateView(to angle: CGFloat) {
|
||||
// Apply rotation to the view's transform
|
||||
view.transform = CGAffineTransform(rotationAngle: angle)
|
||||
}
|
||||
@objc func applicationDidBecomeActive() {
|
||||
self.setDeviceOrientation(orientation: .landscapeRight)
|
||||
// self.setDeviceOrientation(orientation: .landscapeRight)
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
@@ -104,7 +97,13 @@ class PlayerVC: JWPlayerViewController, JWPlayerViewControllerDelegate {
|
||||
}
|
||||
|
||||
@IBAction func backBtnTapped(_ sender: UIButton) {
|
||||
self.transitionToFullScreen(animated: true)
|
||||
// self.transitionToFullScreen(animated: true)
|
||||
self.interfaceBehavior = .hidden
|
||||
self.player.stop()
|
||||
if contentType == .liveStream{
|
||||
self.dismissTapped?()
|
||||
}
|
||||
self.dismiss(animated: true)
|
||||
}
|
||||
|
||||
// MARK: - JWPlayerViewControllerDelegate
|
||||
@@ -191,30 +190,50 @@ class PlayerVC: JWPlayerViewController, JWPlayerViewControllerDelegate {
|
||||
extension PlayerVC {
|
||||
|
||||
func playerViewControllerWillGoFullScreen(_ controller: JWPlayerViewController) -> JWFullScreenViewController? {
|
||||
// controller.shouldEnterFullScreen = false
|
||||
// self.setDeviceOrientation(orientation: .po0rtrait)
|
||||
print("playerViewControllerWillGoFullScreen")
|
||||
// controller.player.stop()
|
||||
// self.player.stop()
|
||||
// controller.dismissFullScreen(animated: true)
|
||||
// self.rotateToPortraitScapeDevice()
|
||||
|
||||
self.interfaceBehavior = .hidden
|
||||
self.player.stop()
|
||||
controller.player.stop()
|
||||
|
||||
self.rotateToPortraitScapeDevice()
|
||||
controller.dismissFullScreen(animated: true)
|
||||
if contentType == .liveStream{
|
||||
self.dismissTapped?()
|
||||
}
|
||||
self.dismiss(animated: true)
|
||||
// self.player.stop()
|
||||
// Timer.scheduledTimer(withTimeInterval: 0.8, repeats: false) { _ in
|
||||
// DispatchQueue.main.async { [weak self] in
|
||||
// guard let self else{return}
|
||||
// if contentType == .liveStream{
|
||||
// self.dismissTapped?()
|
||||
// }
|
||||
// self.dismiss(animated: true)
|
||||
// }
|
||||
// }
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
func playerViewControllerDidGoFullScreen(_ controller: JWPlayerViewController) {
|
||||
print("playerViewControllerDidGoFullScreen")
|
||||
controller.dismissFullScreen(animated: true)
|
||||
controller.player.stop()
|
||||
// self.interfaceBehavior = .hidden
|
||||
// self.player.stop()
|
||||
Timer.scheduledTimer(withTimeInterval: 0.5, repeats: false) { _ in
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
guard let self else{return}
|
||||
if contentType == .liveStream{
|
||||
self.dismissTapped?()
|
||||
}
|
||||
self.dismiss(animated: true)
|
||||
}
|
||||
}
|
||||
// controller.player.stop()
|
||||
// controller.dismissFullScreen(animated: true)
|
||||
//// self.player.stop()
|
||||
// Timer.scheduledTimer(withTimeInterval: 0.8, repeats: false) { _ in
|
||||
// DispatchQueue.main.async { [weak self] in
|
||||
// guard let self else{return}
|
||||
// if contentType == .liveStream{
|
||||
// self.dismissTapped?()
|
||||
// }
|
||||
// self.dismiss(animated: true)
|
||||
// }
|
||||
// }
|
||||
return
|
||||
}
|
||||
|
||||
@@ -281,32 +300,32 @@ extension PlayerVC {
|
||||
}
|
||||
|
||||
// MARK: - Orientation Handling
|
||||
|
||||
extension UIViewController {
|
||||
|
||||
func setDeviceOrientation(orientation: UIInterfaceOrientationMask) {
|
||||
if #available(iOS 16.0, *) {
|
||||
let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene
|
||||
windowScene?.requestGeometryUpdate(.iOS(interfaceOrientations: orientation))
|
||||
} else {
|
||||
UIDevice.current.setValue(orientation.toUIInterfaceOrientation.rawValue, forKey: "orientation")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension UIInterfaceOrientationMask {
|
||||
var toUIInterfaceOrientation: UIInterfaceOrientation {
|
||||
switch self {
|
||||
case .portrait:
|
||||
return .portrait
|
||||
case .portraitUpsideDown:
|
||||
return .portraitUpsideDown
|
||||
case .landscapeRight:
|
||||
return .landscapeRight
|
||||
case .landscapeLeft:
|
||||
return .landscapeLeft
|
||||
default:
|
||||
return .unknown
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
//extension UIViewController {
|
||||
//
|
||||
// func setDeviceOrientation(orientation: UIInterfaceOrientationMask) {
|
||||
// if #available(iOS 16.0, *) {
|
||||
// let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene
|
||||
// windowScene?.requestGeometryUpdate(.iOS(interfaceOrientations: orientation))
|
||||
// } else {
|
||||
// UIDevice.current.setValue(orientation.toUIInterfaceOrientation.rawValue, forKey: "orientation")
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//extension UIInterfaceOrientationMask {
|
||||
// var toUIInterfaceOrientation: UIInterfaceOrientation {
|
||||
// switch self {
|
||||
// case .portrait:
|
||||
// return .portrait
|
||||
// case .portraitUpsideDown:
|
||||
// return .portraitUpsideDown
|
||||
// case .landscapeRight:
|
||||
// return .landscapeRight
|
||||
// case .landscapeLeft:
|
||||
// return .landscapeLeft
|
||||
// default:
|
||||
// return .unknown
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
@@ -14,6 +14,15 @@ class RadioVC: UIViewController, WKNavigationDelegate {
|
||||
var url = "https://wokaland.com/admin/api/woka_fm"
|
||||
// var url = "https://s4.voscast.com:9161/stream" provide on 18th july
|
||||
// var url = "https://planetcast.radiowalla.in/radio.mp3" //url from 24th july
|
||||
|
||||
// Radio Server Address (Direct)
|
||||
// http://live3.rcast.net:9080 - This will not load as iOS directly rejects http
|
||||
// SSL Stream Address (Proxy)
|
||||
// https://stream.rcast.net/71643 - Playing in iOS and loading fine
|
||||
// non-SSL Stream Address (Direct)
|
||||
// http://live3.rcast.net:9080/;stream - This will not work as it is http
|
||||
// Listening Page
|
||||
// https://dir.rcast.net/radio/71643 - This is loading fine. but its showing unknown track
|
||||
|
||||
@IBOutlet weak var backView: UIView!
|
||||
|
||||
|
||||
@@ -74,7 +74,6 @@ class ThemeOneVC: UIViewController {
|
||||
|
||||
override func viewDidLayoutSubviews() {
|
||||
vm.setupAvPlayer()
|
||||
vm.handleBackground()
|
||||
}
|
||||
|
||||
// Define a function to customize tab bar item icon size
|
||||
|
||||
@@ -25,7 +25,8 @@ class ThemeOneVM{
|
||||
vc.bottomArrow.addTapGesture {
|
||||
let sb = UIStoryboard(name: K.StoryBoard.theme, bundle: nil)
|
||||
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Theme.moreVC) as! MoreVC
|
||||
vcPush.modalPresentationStyle = .overCurrentContext
|
||||
vcPush.modalPresentationStyle = .fullScreen
|
||||
vcPush.modalTransitionStyle = .crossDissolve
|
||||
self.vc.present(vcPush, animated: true)
|
||||
}
|
||||
AuthFunc.shareInstance.initTimePeriods()
|
||||
@@ -38,6 +39,8 @@ class ThemeOneVM{
|
||||
|
||||
vc.nameLabel.setContentHuggingPriority(.fittingSizeLevel, for: .horizontal)
|
||||
vc.nameLabel.setContentCompressionResistancePriority(.fittingSizeLevel, for: .horizontal)
|
||||
|
||||
handleBackground()
|
||||
}
|
||||
|
||||
private func handleNotificationCenter(){
|
||||
@@ -54,6 +57,22 @@ class ThemeOneVM{
|
||||
let sb = UIStoryboard(name: K.StoryBoard.webSeries, bundle: nil)
|
||||
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.WebSeries.webSeriesVC) as! WebSeriesVC
|
||||
vc.navigationController?.pushViewController(vcPush, animated: true)
|
||||
case .audioBooks:
|
||||
let sb = UIStoryboard(name: K.StoryBoard.audioBooks, bundle: nil)
|
||||
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.AudioBooks.audioBookHomeVC) as! AudioBookHomeVC
|
||||
vc.navigationController?.pushViewController(vcPush, animated: true)
|
||||
case .games:
|
||||
let sb = UIStoryboard(name: K.StoryBoard.Games, bundle: nil)
|
||||
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Games.gamesListVC) as! GamesListVC
|
||||
vc.navigationController?.pushViewController(vcPush, animated: true)
|
||||
case .karaoke:
|
||||
let sb = UIStoryboard(name: K.StoryBoard.Karaoke, bundle: nil)
|
||||
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Karaoke.karaokeListingVC) as! KaraokeListingVC
|
||||
vc.navigationController?.pushViewController(vcPush, animated: true)
|
||||
case .shop:
|
||||
let sb = UIStoryboard(name: K.StoryBoard.shop, bundle: nil)
|
||||
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Shop.shopListingVC) as! ShopListingVC
|
||||
vc.navigationController?.pushViewController(vcPush, animated: true)
|
||||
case .liveTV:
|
||||
handleTap(UITapGestureRecognizer())
|
||||
}
|
||||
|
||||
@@ -54,6 +54,22 @@ class ThemeTwoVM{
|
||||
let sb = UIStoryboard(name: K.StoryBoard.webSeries, bundle: nil)
|
||||
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.WebSeries.webSeriesVC) as! WebSeriesVC
|
||||
vc.navigationController?.pushViewController(vcPush, animated: true)
|
||||
case .audioBooks:
|
||||
let sb = UIStoryboard(name: K.StoryBoard.audioBooks, bundle: nil)
|
||||
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.AudioBooks.audioBookHomeVC) as! AudioBookHomeVC
|
||||
vc.navigationController?.pushViewController(vcPush, animated: true)
|
||||
case .games:
|
||||
let sb = UIStoryboard(name: K.StoryBoard.Games, bundle: nil)
|
||||
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Games.gamesListVC) as! GamesListVC
|
||||
vc.navigationController?.pushViewController(vcPush, animated: true)
|
||||
case .karaoke:
|
||||
let sb = UIStoryboard(name: K.StoryBoard.Karaoke, bundle: nil)
|
||||
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Karaoke.karaokeListingVC) as! KaraokeListingVC
|
||||
vc.navigationController?.pushViewController(vcPush, animated: true)
|
||||
case .shop:
|
||||
let sb = UIStoryboard(name: K.StoryBoard.shop, bundle: nil)
|
||||
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Shop.shopListingVC) as! ShopListingVC
|
||||
vc.navigationController?.pushViewController(vcPush, animated: true)
|
||||
case .liveTV:
|
||||
playLiveTV()
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ class JWPlayerManager {
|
||||
playerVC.videoIndex = startIndex
|
||||
playerVC.contentType = contentType
|
||||
playerVC.config = finalConfig
|
||||
playerVC.modalPresentationStyle = .overFullScreen
|
||||
playerVC.modalPresentationStyle = .fullScreen
|
||||
playerVC.modalTransitionStyle = .crossDissolve
|
||||
// Present the PlayerVC
|
||||
Utilities.dismissProgressHUD()
|
||||
|
||||
Reference in New Issue
Block a user