diff --git a/CBOnlineIos.xcodeproj/project.pbxproj b/CBOnlineIos.xcodeproj/project.pbxproj index aef7c259..48b65cfe 100644 --- a/CBOnlineIos.xcodeproj/project.pbxproj +++ b/CBOnlineIos.xcodeproj/project.pbxproj @@ -7,49 +7,65 @@ objects = { /* Begin PBXBuildFile section */ - 5728249A24C6FF8B009CEE87 /* Email.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5728249924C6FF8B009CEE87 /* Email.swift */; }; - 57A03B7324BDDD2A00EA9B6A /* UIViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57A03B7224BDDD2A00EA9B6A /* UIViewController.swift */; }; - 57A14D1B24D0533300D2AC13 /* MDCFilledTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57A14D1A24D0533300D2AC13 /* MDCFilledTextField.swift */; }; - 57A36F2824B64E7E00A1DA56 /* BorderCurve.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57A36F2724B64E7E00A1DA56 /* BorderCurve.swift */; }; - 57A36F2A24B64EFD00A1DA56 /* NSAttributedString.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57A36F2924B64EFD00A1DA56 /* NSAttributedString.swift */; }; - 57A36F2C24B64F4E00A1DA56 /* Login.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57A36F2B24B64F4E00A1DA56 /* Login.swift */; }; - 57A36F2E24B64F8900A1DA56 /* OTPVerify.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57A36F2D24B64F8900A1DA56 /* OTPVerify.swift */; }; - 57CACB702491440D0013E3AA /* onboardingScreen .swift in Sources */ = {isa = PBXBuildFile; fileRef = 57CACB6F2491440D0013E3AA /* onboardingScreen .swift */; }; - 57CACB7424914CB80013E3AA /* ButtonFillGradient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57CACB7324914CB80013E3AA /* ButtonFillGradient.swift */; }; - 57CACB7624914CF70013E3AA /* ButtonBorderGradient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57CACB7524914CF70013E3AA /* ButtonBorderGradient.swift */; }; 82AEA0054B870D344E318F47 /* Pods_CBOnlineIos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EC848350B72E35000EBA848 /* Pods_CBOnlineIos.framework */; }; - E5123ABA22857462005722AC /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5123AB922857462005722AC /* AppDelegate.swift */; }; - E5123ABC22857462005722AC /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5123ABB22857462005722AC /* ViewController.swift */; }; E5123ABF22857462005722AC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E5123ABD22857462005722AC /* Main.storyboard */; }; E5123AC122857464005722AC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E5123AC022857464005722AC /* Assets.xcassets */; }; E5123AC422857464005722AC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E5123AC222857464005722AC /* LaunchScreen.storyboard */; }; - E5DBADE222A2EA4A007A20B5 /* Extensions+UIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5DBADE122A2EA4A007A20B5 /* Extensions+UIView.swift */; }; - E5DBADE522A2EA75007A20B5 /* CourseCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5DBADE422A2EA75007A20B5 /* CourseCard.swift */; }; + FF022ACC24D153E500816E24 /* ProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF022ACB24D153E500816E24 /* ProgressView.swift */; }; + FF09EE8F24D57AC8005DDAC2 /* Extensions+UIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF09EE8B24D57AC8005DDAC2 /* Extensions+UIView.swift */; }; + FF09EE9024D57AC8005DDAC2 /* NSAttributedString.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF09EE8C24D57AC8005DDAC2 /* NSAttributedString.swift */; }; + FF09EE9124D57AC8005DDAC2 /* MDCFilledTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF09EE8D24D57AC8005DDAC2 /* MDCFilledTextField.swift */; }; + FF09EE9224D57AC8005DDAC2 /* UIViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF09EE8E24D57AC8005DDAC2 /* UIViewController.swift */; }; + FF09EE9824D57AD4005DDAC2 /* OTPVerify.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF09EE9324D57AD4005DDAC2 /* OTPVerify.swift */; }; + FF09EE9924D57AD4005DDAC2 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF09EE9424D57AD4005DDAC2 /* ViewController.swift */; }; + FF09EE9A24D57AD4005DDAC2 /* Email.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF09EE9524D57AD4005DDAC2 /* Email.swift */; }; + FF09EE9B24D57AD4005DDAC2 /* onboardingScreen .swift in Sources */ = {isa = PBXBuildFile; fileRef = FF09EE9624D57AD4005DDAC2 /* onboardingScreen .swift */; }; + FF09EE9C24D57AD4005DDAC2 /* Login.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF09EE9724D57AD4005DDAC2 /* Login.swift */; }; + FF09EEA124D57AE1005DDAC2 /* BorderCurve.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF09EE9D24D57AE1005DDAC2 /* BorderCurve.swift */; }; + FF09EEA224D57AE1005DDAC2 /* ButtonBorderGradient.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF09EE9E24D57AE1005DDAC2 /* ButtonBorderGradient.swift */; }; + FF09EEA324D57AE1005DDAC2 /* ButtonFillGradient.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF09EE9F24D57AE1005DDAC2 /* ButtonFillGradient.swift */; }; + FF09EEA424D57AE1005DDAC2 /* CourseCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF09EEA024D57AE1005DDAC2 /* CourseCard.swift */; }; + FF09EEA724D57F1E005DDAC2 /* MyCourseTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = FF09EEA524D57F1E005DDAC2 /* MyCourseTableViewCell.xib */; }; + FF09EEA824D57F1E005DDAC2 /* MyCourseTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF09EEA624D57F1E005DDAC2 /* MyCourseTableViewCell.swift */; }; + FF11F51F24C9A2A2007600F0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF11F51E24C9A2A1007600F0 /* AppDelegate.swift */; }; + FFF21EB624D5D0A30022C8A6 /* CustomBottomSheetTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFF21EB524D5D0A30022C8A6 /* CustomBottomSheetTableViewCell.swift */; }; + FFF716AA249C61200043EB81 /* DashboardViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFF716A9249C61200043EB81 /* DashboardViewController.swift */; }; + FFF716AC249C66480043EB81 /* ExploreViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFF716AB249C66480043EB81 /* ExploreViewController.swift */; }; + FFF716FC24A19EAF0043EB81 /* MyCoursesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFF716FB24A19EAF0043EB81 /* MyCoursesViewController.swift */; }; + FFFDA31324C4AAE00087FB6B /* CA_Layer.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFFDA31224C4AAE00087FB6B /* CA_Layer.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 29A67E85AF305C97A6C0CACB /* Pods-CBOnlineIos.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CBOnlineIos.debug.xcconfig"; path = "Target Support Files/Pods-CBOnlineIos/Pods-CBOnlineIos.debug.xcconfig"; sourceTree = ""; }; - 5728249924C6FF8B009CEE87 /* Email.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Email.swift; sourceTree = ""; }; - 57A03B7224BDDD2A00EA9B6A /* UIViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIViewController.swift; sourceTree = ""; }; - 57A14D1A24D0533300D2AC13 /* MDCFilledTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDCFilledTextField.swift; sourceTree = ""; }; - 57A36F2724B64E7E00A1DA56 /* BorderCurve.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BorderCurve.swift; sourceTree = ""; }; - 57A36F2924B64EFD00A1DA56 /* NSAttributedString.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSAttributedString.swift; sourceTree = ""; }; - 57A36F2B24B64F4E00A1DA56 /* Login.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Login.swift; sourceTree = ""; }; - 57A36F2D24B64F8900A1DA56 /* OTPVerify.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OTPVerify.swift; sourceTree = ""; }; - 57CACB6F2491440D0013E3AA /* onboardingScreen .swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "onboardingScreen .swift"; sourceTree = ""; }; - 57CACB7324914CB80013E3AA /* ButtonFillGradient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonFillGradient.swift; sourceTree = ""; }; - 57CACB7524914CF70013E3AA /* ButtonBorderGradient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonBorderGradient.swift; sourceTree = ""; }; 6EC848350B72E35000EBA848 /* Pods_CBOnlineIos.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CBOnlineIos.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 932BC159D3896363EBD793BD /* Pods-CBOnlineIos.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CBOnlineIos.release.xcconfig"; path = "Target Support Files/Pods-CBOnlineIos/Pods-CBOnlineIos.release.xcconfig"; sourceTree = ""; }; E5123AB622857462005722AC /* CBOnlineIos.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CBOnlineIos.app; sourceTree = BUILT_PRODUCTS_DIR; }; - E5123AB922857462005722AC /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - E5123ABB22857462005722AC /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; E5123ABE22857462005722AC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; E5123AC022857464005722AC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; E5123AC322857464005722AC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; E5123AC522857464005722AC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - E5DBADE122A2EA4A007A20B5 /* Extensions+UIView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Extensions+UIView.swift"; sourceTree = ""; }; - E5DBADE422A2EA75007A20B5 /* CourseCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseCard.swift; sourceTree = ""; }; + FF022ACB24D153E500816E24 /* ProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgressView.swift; sourceTree = ""; }; + FF09EE8B24D57AC8005DDAC2 /* Extensions+UIView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "Extensions+UIView.swift"; path = "../../../CB_App_Clone/CBOnlineIos/Extensions/Extensions+UIView.swift"; sourceTree = ""; }; + FF09EE8C24D57AC8005DDAC2 /* NSAttributedString.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = NSAttributedString.swift; path = ../../../CB_App_Clone/CBOnlineIos/Extensions/NSAttributedString.swift; sourceTree = ""; }; + FF09EE8D24D57AC8005DDAC2 /* MDCFilledTextField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MDCFilledTextField.swift; path = ../../../CB_App_Clone/CBOnlineIos/Extensions/MDCFilledTextField.swift; sourceTree = ""; }; + FF09EE8E24D57AC8005DDAC2 /* UIViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = UIViewController.swift; path = ../../../CB_App_Clone/CBOnlineIos/Extensions/UIViewController.swift; sourceTree = ""; }; + FF09EE9324D57AD4005DDAC2 /* OTPVerify.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = OTPVerify.swift; path = ../../../CB_App_Clone/CBOnlineIos/Presentation/OTPVerify.swift; sourceTree = ""; }; + FF09EE9424D57AD4005DDAC2 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewController.swift; path = ../../../CB_App_Clone/CBOnlineIos/Presentation/ViewController.swift; sourceTree = ""; }; + FF09EE9524D57AD4005DDAC2 /* Email.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Email.swift; path = ../../../CB_App_Clone/CBOnlineIos/Presentation/Email.swift; sourceTree = ""; }; + FF09EE9624D57AD4005DDAC2 /* onboardingScreen .swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "onboardingScreen .swift"; path = "../../../CB_App_Clone/CBOnlineIos/Presentation/onboardingScreen .swift"; sourceTree = ""; }; + FF09EE9724D57AD4005DDAC2 /* Login.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Login.swift; path = ../../../CB_App_Clone/CBOnlineIos/Presentation/Login.swift; sourceTree = ""; }; + FF09EE9D24D57AE1005DDAC2 /* BorderCurve.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BorderCurve.swift; path = ../../../CB_App_Clone/CBOnlineIos/Views/BorderCurve.swift; sourceTree = ""; }; + FF09EE9E24D57AE1005DDAC2 /* ButtonBorderGradient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ButtonBorderGradient.swift; path = ../../../CB_App_Clone/CBOnlineIos/Views/ButtonBorderGradient.swift; sourceTree = ""; }; + FF09EE9F24D57AE1005DDAC2 /* ButtonFillGradient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ButtonFillGradient.swift; path = ../../../CB_App_Clone/CBOnlineIos/Views/ButtonFillGradient.swift; sourceTree = ""; }; + FF09EEA024D57AE1005DDAC2 /* CourseCard.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CourseCard.swift; path = ../../../CB_App_Clone/CBOnlineIos/Views/CourseCard.swift; sourceTree = ""; }; + FF09EEA524D57F1E005DDAC2 /* MyCourseTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MyCourseTableViewCell.xib; sourceTree = ""; }; + FF09EEA624D57F1E005DDAC2 /* MyCourseTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MyCourseTableViewCell.swift; sourceTree = ""; }; + FF11F51E24C9A2A1007600F0 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = Presentation/AppDelegate.swift; sourceTree = ""; }; + FFF21EB524D5D0A30022C8A6 /* CustomBottomSheetTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomBottomSheetTableViewCell.swift; sourceTree = ""; }; + FFF716A9249C61200043EB81 /* DashboardViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = DashboardViewController.swift; path = CBOnlineIos/Presentation/DashboardViewController.swift; sourceTree = SOURCE_ROOT; }; + FFF716AB249C66480043EB81 /* ExploreViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExploreViewController.swift; sourceTree = ""; }; + FFF716FB24A19EAF0043EB81 /* MyCoursesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = MyCoursesViewController.swift; path = CBOnlineIos/Presentation/MyCoursesViewController.swift; sourceTree = SOURCE_ROOT; }; + FFFDA31224C4AAE00087FB6B /* CA_Layer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CA_Layer.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -84,12 +100,16 @@ 57CACB71249144640013E3AA /* Presentation */ = { isa = PBXGroup; children = ( - E5123AB922857462005722AC /* AppDelegate.swift */, - E5123ABB22857462005722AC /* ViewController.swift */, - 57CACB6F2491440D0013E3AA /* onboardingScreen .swift */, - 57A36F2B24B64F4E00A1DA56 /* Login.swift */, - 57A36F2D24B64F8900A1DA56 /* OTPVerify.swift */, - 5728249924C6FF8B009CEE87 /* Email.swift */, + FF09EE9724D57AD4005DDAC2 /* Login.swift */, + FF09EE9524D57AD4005DDAC2 /* Email.swift */, + FF09EE9624D57AD4005DDAC2 /* onboardingScreen .swift */, + FF09EE9324D57AD4005DDAC2 /* OTPVerify.swift */, + FF09EE9424D57AD4005DDAC2 /* ViewController.swift */, + FFF716A9249C61200043EB81 /* DashboardViewController.swift */, + FFF716AB249C66480043EB81 /* ExploreViewController.swift */, + FFF716FB24A19EAF0043EB81 /* MyCoursesViewController.swift */, + FF09EEA624D57F1E005DDAC2 /* MyCourseTableViewCell.swift */, + FF09EEA524D57F1E005DDAC2 /* MyCourseTableViewCell.xib */, ); path = Presentation; sourceTree = ""; @@ -97,8 +117,8 @@ 57CACB72249144B00013E3AA /* StoryBoards */ = { isa = PBXGroup; children = ( - E5123AC222857464005722AC /* LaunchScreen.storyboard */, E5123ABD22857462005722AC /* Main.storyboard */, + E5123AC222857464005722AC /* LaunchScreen.storyboard */, ); path = StoryBoards; sourceTree = ""; @@ -128,6 +148,7 @@ E5DBADE022A2EA22007A20B5 /* Extensions */, 57CACB71249144640013E3AA /* Presentation */, 57CACB72249144B00013E3AA /* StoryBoards */, + FF11F51E24C9A2A1007600F0 /* AppDelegate.swift */, E5123AC022857464005722AC /* Assets.xcassets */, E5123AC522857464005722AC /* Info.plist */, ); @@ -137,10 +158,11 @@ E5DBADE022A2EA22007A20B5 /* Extensions */ = { isa = PBXGroup; children = ( - E5DBADE122A2EA4A007A20B5 /* Extensions+UIView.swift */, - 57A36F2924B64EFD00A1DA56 /* NSAttributedString.swift */, - 57A03B7224BDDD2A00EA9B6A /* UIViewController.swift */, - 57A14D1A24D0533300D2AC13 /* MDCFilledTextField.swift */, + FF09EE8B24D57AC8005DDAC2 /* Extensions+UIView.swift */, + FF09EE8D24D57AC8005DDAC2 /* MDCFilledTextField.swift */, + FF09EE8C24D57AC8005DDAC2 /* NSAttributedString.swift */, + FF09EE8E24D57AC8005DDAC2 /* UIViewController.swift */, + FFFDA31224C4AAE00087FB6B /* CA_Layer.swift */, ); path = Extensions; sourceTree = ""; @@ -148,10 +170,12 @@ E5DBADE322A2EA60007A20B5 /* Views */ = { isa = PBXGroup; children = ( - E5DBADE422A2EA75007A20B5 /* CourseCard.swift */, - 57CACB7324914CB80013E3AA /* ButtonFillGradient.swift */, - 57CACB7524914CF70013E3AA /* ButtonBorderGradient.swift */, - 57A36F2724B64E7E00A1DA56 /* BorderCurve.swift */, + FFF21EB524D5D0A30022C8A6 /* CustomBottomSheetTableViewCell.swift */, + FF09EE9D24D57AE1005DDAC2 /* BorderCurve.swift */, + FF09EE9E24D57AE1005DDAC2 /* ButtonBorderGradient.swift */, + FF09EE9F24D57AE1005DDAC2 /* ButtonFillGradient.swift */, + FF09EEA024D57AE1005DDAC2 /* CourseCard.swift */, + FF022ACB24D153E500816E24 /* ProgressView.swift */, ); path = Views; sourceTree = ""; @@ -216,6 +240,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + FF09EEA724D57F1E005DDAC2 /* MyCourseTableViewCell.xib in Resources */, E5123AC422857464005722AC /* LaunchScreen.storyboard in Resources */, E5123AC122857464005722AC /* Assets.xcassets in Resources */, E5123ABF22857462005722AC /* Main.storyboard in Resources */, @@ -271,20 +296,27 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - E5123ABC22857462005722AC /* ViewController.swift in Sources */, - 57A36F2C24B64F4E00A1DA56 /* Login.swift in Sources */, - 57A03B7324BDDD2A00EA9B6A /* UIViewController.swift in Sources */, - E5123ABA22857462005722AC /* AppDelegate.swift in Sources */, - 57A14D1B24D0533300D2AC13 /* MDCFilledTextField.swift in Sources */, - 57CACB7424914CB80013E3AA /* ButtonFillGradient.swift in Sources */, - 57A36F2824B64E7E00A1DA56 /* BorderCurve.swift in Sources */, - 57A36F2A24B64EFD00A1DA56 /* NSAttributedString.swift in Sources */, - 57CACB7624914CF70013E3AA /* ButtonBorderGradient.swift in Sources */, - 57A36F2E24B64F8900A1DA56 /* OTPVerify.swift in Sources */, - 57CACB702491440D0013E3AA /* onboardingScreen .swift in Sources */, - 5728249A24C6FF8B009CEE87 /* Email.swift in Sources */, - E5DBADE522A2EA75007A20B5 /* CourseCard.swift in Sources */, - E5DBADE222A2EA4A007A20B5 /* Extensions+UIView.swift in Sources */, + FF09EE9C24D57AD4005DDAC2 /* Login.swift in Sources */, + FF09EEA124D57AE1005DDAC2 /* BorderCurve.swift in Sources */, + FF11F51F24C9A2A2007600F0 /* AppDelegate.swift in Sources */, + FFF21EB624D5D0A30022C8A6 /* CustomBottomSheetTableViewCell.swift in Sources */, + FF09EE8F24D57AC8005DDAC2 /* Extensions+UIView.swift in Sources */, + FF09EEA824D57F1E005DDAC2 /* MyCourseTableViewCell.swift in Sources */, + FF09EEA224D57AE1005DDAC2 /* ButtonBorderGradient.swift in Sources */, + FF09EEA424D57AE1005DDAC2 /* CourseCard.swift in Sources */, + FF09EE9A24D57AD4005DDAC2 /* Email.swift in Sources */, + FF09EE9124D57AC8005DDAC2 /* MDCFilledTextField.swift in Sources */, + FF022ACC24D153E500816E24 /* ProgressView.swift in Sources */, + FF09EE9024D57AC8005DDAC2 /* NSAttributedString.swift in Sources */, + FFFDA31324C4AAE00087FB6B /* CA_Layer.swift in Sources */, + FF09EE9824D57AD4005DDAC2 /* OTPVerify.swift in Sources */, + FFF716AC249C66480043EB81 /* ExploreViewController.swift in Sources */, + FF09EE9924D57AD4005DDAC2 /* ViewController.swift in Sources */, + FFF716AA249C61200043EB81 /* DashboardViewController.swift in Sources */, + FF09EEA324D57AE1005DDAC2 /* ButtonFillGradient.swift in Sources */, + FF09EE9B24D57AD4005DDAC2 /* onboardingScreen .swift in Sources */, + FF09EE9224D57AC8005DDAC2 /* UIViewController.swift in Sources */, + FFF716FC24A19EAF0043EB81 /* MyCoursesViewController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -361,7 +393,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.2; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -416,7 +448,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.2; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; @@ -432,9 +464,9 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = BXD5262846; + DEVELOPMENT_TEAM = RK3JMA88P6; INFOPLIST_FILE = CBOnlineIos/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.2; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -452,9 +484,9 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = BXD5262846; + DEVELOPMENT_TEAM = RK3JMA88P6; INFOPLIST_FILE = CBOnlineIos/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.2; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/CBOnlineIos/Assets.xcassets/courseImage.imageset/Contents.json b/CBOnlineIos/Assets.xcassets/courseImage.imageset/Contents.json new file mode 100644 index 00000000..6c338ea8 --- /dev/null +++ b/CBOnlineIos/Assets.xcassets/courseImage.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "courseImage.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/CBOnlineIos/Assets.xcassets/courseImage.imageset/courseImage.jpg b/CBOnlineIos/Assets.xcassets/courseImage.imageset/courseImage.jpg new file mode 100644 index 00000000..80591c38 Binary files /dev/null and b/CBOnlineIos/Assets.xcassets/courseImage.imageset/courseImage.jpg differ diff --git a/CBOnlineIos/Assets.xcassets/fire.imageset/Contents.json b/CBOnlineIos/Assets.xcassets/fire.imageset/Contents.json new file mode 100644 index 00000000..718503ed --- /dev/null +++ b/CBOnlineIos/Assets.xcassets/fire.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "fire.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/CBOnlineIos/Assets.xcassets/fire.imageset/fire.png b/CBOnlineIos/Assets.xcassets/fire.imageset/fire.png new file mode 100644 index 00000000..6b203e15 Binary files /dev/null and b/CBOnlineIos/Assets.xcassets/fire.imageset/fire.png differ diff --git a/CBOnlineIos/Assets.xcassets/graph.imageset/Contents.json b/CBOnlineIos/Assets.xcassets/graph.imageset/Contents.json new file mode 100644 index 00000000..29d63a67 --- /dev/null +++ b/CBOnlineIos/Assets.xcassets/graph.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "graph.jpeg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/CBOnlineIos/Assets.xcassets/graph.imageset/graph.jpeg b/CBOnlineIos/Assets.xcassets/graph.imageset/graph.jpeg new file mode 100644 index 00000000..c6fca025 Binary files /dev/null and b/CBOnlineIos/Assets.xcassets/graph.imageset/graph.jpeg differ diff --git a/CBOnlineIos/Assets.xcassets/growth.imageset/Contents.json b/CBOnlineIos/Assets.xcassets/growth.imageset/Contents.json new file mode 100644 index 00000000..e476ff75 --- /dev/null +++ b/CBOnlineIos/Assets.xcassets/growth.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "growth.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/CBOnlineIos/Assets.xcassets/growth.imageset/growth.png b/CBOnlineIos/Assets.xcassets/growth.imageset/growth.png new file mode 100644 index 00000000..d9a41812 Binary files /dev/null and b/CBOnlineIos/Assets.xcassets/growth.imageset/growth.png differ diff --git a/CBOnlineIos/Assets.xcassets/trophy.imageset/Contents.json b/CBOnlineIos/Assets.xcassets/trophy.imageset/Contents.json new file mode 100644 index 00000000..75e0d334 --- /dev/null +++ b/CBOnlineIos/Assets.xcassets/trophy.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "trophy.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/CBOnlineIos/Assets.xcassets/trophy.imageset/trophy.png b/CBOnlineIos/Assets.xcassets/trophy.imageset/trophy.png new file mode 100644 index 00000000..2154e0f6 Binary files /dev/null and b/CBOnlineIos/Assets.xcassets/trophy.imageset/trophy.png differ diff --git a/CBOnlineIos/Extensions/CA_Layer.swift b/CBOnlineIos/Extensions/CA_Layer.swift new file mode 100644 index 00000000..c6df7469 --- /dev/null +++ b/CBOnlineIos/Extensions/CA_Layer.swift @@ -0,0 +1,42 @@ +// +// CA_Layer.swift +// CBOnlineIos +// +// Created by Pushpinder Pal Singh on 19/07/20. +// Copyright © 2020 Coding Blocks. All rights reserved. +// + +import UIKit + +extension CALayer { + + /// Function to add Shadow + /// - Parameters: + /// - color: The Colour of the Shadow + /// - alpha: Transparency Value + /// - x: X axis of shadow + /// - y: y axis of shadow + /// - blur: blur of the shadow + /// - spread: spread of the shadow + func applySketchShadow( + color: UIColor = .black, + alpha: Float = 0.5, + x: CGFloat = 0, + y: CGFloat = 2, + blur: CGFloat = 4, + spread: CGFloat = 0) + { + shadowColor = color.cgColor + shadowOpacity = alpha + shadowOffset = CGSize(width: x, height: y) + shadowRadius = blur / 2.0 + if spread == 0 { + shadowPath = nil + } else { + let dx = -spread + let rect = bounds.insetBy(dx: dx, dy: dx) + shadowPath = UIBezierPath(rect: rect).cgPath + } + } +} + diff --git a/CBOnlineIos/Extensions/Extensions+UIView.swift b/CBOnlineIos/Extensions/Extensions+UIView.swift deleted file mode 100644 index d24957b5..00000000 --- a/CBOnlineIos/Extensions/Extensions+UIView.swift +++ /dev/null @@ -1,90 +0,0 @@ - - -import UIKit - -extension UIColor { - static func rgb(red: CGFloat, green: CGFloat, blue: CGFloat) -> UIColor { - return UIColor(red: red/255, green: green/255, blue: blue/255, alpha: 1) - } -} - -struct AnchoredConstraints { - var top, leading, bottom, trailing, width, height: NSLayoutConstraint? -} - -extension UIView { - - @discardableResult - func anchor(top: NSLayoutYAxisAnchor?, leading: NSLayoutXAxisAnchor?, bottom: NSLayoutYAxisAnchor?, trailing: NSLayoutXAxisAnchor?, padding: UIEdgeInsets = .zero, size: CGSize = .zero) -> AnchoredConstraints { - - translatesAutoresizingMaskIntoConstraints = false - var anchoredConstraints = AnchoredConstraints() - - if let top = top { - anchoredConstraints.top = topAnchor.constraint(equalTo: top, constant: padding.top) - } - - if let leading = leading { - anchoredConstraints.leading = leadingAnchor.constraint(equalTo: leading, constant: padding.left) - } - - if let bottom = bottom { - anchoredConstraints.bottom = bottomAnchor.constraint(equalTo: bottom, constant: -padding.bottom) - } - - if let trailing = trailing { - anchoredConstraints.trailing = trailingAnchor.constraint(equalTo: trailing, constant: -padding.right) - } - - if size.width != 0 { - anchoredConstraints.width = widthAnchor.constraint(equalToConstant: size.width) - } - - if size.height != 0 { - anchoredConstraints.height = heightAnchor.constraint(equalToConstant: size.height) - } - - [anchoredConstraints.top, anchoredConstraints.leading, anchoredConstraints.bottom, anchoredConstraints.trailing, anchoredConstraints.width, anchoredConstraints.height].forEach{ $0?.isActive = true } - - return anchoredConstraints - } - - func fillSuperview(padding: UIEdgeInsets = .zero) { - translatesAutoresizingMaskIntoConstraints = false - if let superviewTopAnchor = superview?.topAnchor { - topAnchor.constraint(equalTo: superviewTopAnchor, constant: padding.top).isActive = true - } - - if let superviewBottomAnchor = superview?.bottomAnchor { - bottomAnchor.constraint(equalTo: superviewBottomAnchor, constant: -padding.bottom).isActive = true - } - - if let superviewLeadingAnchor = superview?.leadingAnchor { - leadingAnchor.constraint(equalTo: superviewLeadingAnchor, constant: padding.left).isActive = true - } - - if let superviewTrailingAnchor = superview?.trailingAnchor { - trailingAnchor.constraint(equalTo: superviewTrailingAnchor, constant: -padding.right).isActive = true - } - } - - func centerInSuperview(size: CGSize = .zero) { - translatesAutoresizingMaskIntoConstraints = false - if let superviewCenterXAnchor = superview?.centerXAnchor { - centerXAnchor.constraint(equalTo: superviewCenterXAnchor).isActive = true - } - - if let superviewCenterYAnchor = superview?.centerYAnchor { - centerYAnchor.constraint(equalTo: superviewCenterYAnchor).isActive = true - } - - if size.width != 0 { - widthAnchor.constraint(equalToConstant: size.width).isActive = true - } - - if size.height != 0 { - heightAnchor.constraint(equalToConstant: size.height).isActive = true - } - } - -} diff --git a/CBOnlineIos/Presentation/DashboardViewController.swift b/CBOnlineIos/Presentation/DashboardViewController.swift new file mode 100644 index 00000000..8850f355 --- /dev/null +++ b/CBOnlineIos/Presentation/DashboardViewController.swift @@ -0,0 +1,26 @@ +// +// DashboardViewController.swift +// CBOnlineIos +// +// Created by Pushpinder Pal Singh on 19/06/20. +// Copyright © 2020 Coding Blocks. All rights reserved. +// + +import UIKit + +class DashboardViewController: UIViewController { + + @IBOutlet weak var navBarView: UIView! + @IBOutlet var performaceViews: [UIView]! + @IBOutlet weak var CourseProgress: CustomHorizontalProgressView! + override func viewDidLoad() { + super.viewDidLoad() + navBarView.layer.cornerRadius = 20 + for views in performaceViews{ + views.layer.applySketchShadow(color: .gray, alpha: 0.3, x: 0, y: 0, blur: 0, spread: 1) + } + CourseProgress.progress = 91 + } + +} + diff --git a/CBOnlineIos/Presentation/ExploreViewController.swift b/CBOnlineIos/Presentation/ExploreViewController.swift new file mode 100644 index 00000000..391d504d --- /dev/null +++ b/CBOnlineIos/Presentation/ExploreViewController.swift @@ -0,0 +1,46 @@ +// +// ExploreViewController.swift +// CBOnlineIos +// +// Created by Pushpinder Pal Singh on 19/06/20. +// Copyright © 2020 Coding Blocks. All rights reserved. +// + +import UIKit + +class ExploreViewController: UIViewController { + + @IBOutlet weak var navBarView: UIView! + @IBOutlet weak var headerButton: UIView! + @IBOutlet weak var headerButtonTopic: UILabel! + @IBOutlet weak var headerViewCoursesText: UILabel! + @IBOutlet weak var headerViewCoursesImage: UIImageView! + + let gradient = CAGradientLayer() + + override func viewDidLoad() { + super.viewDidLoad() + setNavBar() + setHeaderButton() + } + func setNavBar(){ + navBarView.layer.cornerRadius = 20 + navBarView.clipsToBounds = true + navBarView.layer.maskedCorners = [.layerMinXMaxYCorner,.layerMaxXMaxYCorner] + } + func setHeaderButton(){ + gradient.cornerRadius = 10 + gradient.frame = headerButton.bounds + gradient.colors = [UIColor.rgb(red: 4, green: 103, blue: 246).cgColor, UIColor.rgb(red: 4, green: 16, blue: 176).cgColor] + gradient.startPoint = CGPoint(x: 0.0, y: 0.5) + gradient.endPoint = CGPoint(x: 1.0, y: 0.5) + headerButton.layer.addSublayer(gradient) + headerButton.addSubview(headerButtonTopic) + headerButton.addSubview(headerViewCoursesText) + headerButton.addSubview(headerViewCoursesImage) + } + + @IBAction func headerButtonPressed(_ sender: UIButton) { + print("Whats up dog?") + } +} diff --git a/CBOnlineIos/Presentation/MyCourseTableViewCell.swift b/CBOnlineIos/Presentation/MyCourseTableViewCell.swift new file mode 100644 index 00000000..80cbd7ec --- /dev/null +++ b/CBOnlineIos/Presentation/MyCourseTableViewCell.swift @@ -0,0 +1,29 @@ +// +// MyCourseTableViewCell.swift +// CBOnlineIos +// +// Created by Pushpinder Pal Singh on 30/07/20. +// Copyright © 2020 Coding Blocks. All rights reserved. +// + +import UIKit + +class MyCourseTableViewCell: UITableViewCell { + + @IBOutlet weak var courseImage: UIImageView! + @IBOutlet weak var headerLabel: UILabel! + @IBOutlet weak var detailLabel: UILabel! + @IBOutlet weak var progressLabel: UILabel! + @IBOutlet weak var progressView: CustomHorizontalProgressView! + + override func awakeFromNib() { + super.awakeFromNib() + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } + +} diff --git a/CBOnlineIos/Presentation/MyCourseTableViewCell.xib b/CBOnlineIos/Presentation/MyCourseTableViewCell.xib new file mode 100644 index 00000000..f0246275 --- /dev/null +++ b/CBOnlineIos/Presentation/MyCourseTableViewCell.xib @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CBOnlineIos/Presentation/MyCoursesViewController.swift b/CBOnlineIos/Presentation/MyCoursesViewController.swift new file mode 100644 index 00000000..4faef64d --- /dev/null +++ b/CBOnlineIos/Presentation/MyCoursesViewController.swift @@ -0,0 +1,122 @@ +import UIKit + +class MyCoursesViewController: UIViewController, UITableViewDelegate { + + @IBOutlet weak var recentlyAdded: UIButton! + @IBOutlet weak var MyCourseTableView: UITableView! + + var transparentView = UIView() + var tableView = UITableView() + let height: CGFloat = UIScreen.main.bounds.height / 2 + + var settingArray = ["Recently Accessed","Expired Courses","Free Trials","All Courses","Premium","Active"] + var imageArray = ["play.fill","exclamationmark.triangle","lock","video","star","play"] + + override func viewDidLoad() { + super.viewDidLoad() + self.view = view + MyCourseTableView.dataSource = self + MyCourseTableView.register(UINib(nibName: "MyCourseTableViewCell", bundle: nil), forCellReuseIdentifier: "MyCourseTableViewCell") + + tableView.isScrollEnabled = false + tableView.delegate = self + tableView.dataSource = self + tableView.register(CustomBottomSheetTableViewCell.self, forCellReuseIdentifier: "Cell") + + } + + @IBAction func recentlyPressed(_ sender: UIButton) { + let window = UIApplication.shared.keyWindow + transparentView.backgroundColor = UIColor.black.withAlphaComponent(0.9) + transparentView.frame = self.view.frame + window?.addSubview(transparentView) + + let screenSize = UIScreen.main.bounds.size + tableView.frame = CGRect(x: 0, y: screenSize.height, width: screenSize.width, height: height) + tableView.layer.cornerRadius = 20 + window?.addSubview(tableView) + + let tapGesture = UITapGestureRecognizer(target: self, action: #selector(onClickTransparentView)) + transparentView.addGestureRecognizer(tapGesture) + + transparentView.alpha = 0 + + UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 1.0, initialSpringVelocity: 1.0, options: .curveEaseInOut, animations: { + self.transparentView.alpha = 0.5 + self.tableView.frame = CGRect(x: 0, y: screenSize.height - self.height, width: screenSize.width, height: self.height) + }, completion: nil) + } + + @IBAction func pleasework(_ sender: Any) { + let window = UIApplication.shared.keyWindow + transparentView.backgroundColor = UIColor.black.withAlphaComponent(0.9) + transparentView.frame = self.view.frame + window?.addSubview(transparentView) + + let screenSize = UIScreen.main.bounds.size + tableView.frame = CGRect(x: 0, y: screenSize.height, width: screenSize.width, height: height) + tableView.layer.cornerRadius = 20 + window?.addSubview(tableView) + + let tapGesture = UITapGestureRecognizer(target: self, action: #selector(onClickTransparentView)) + transparentView.addGestureRecognizer(tapGesture) + + transparentView.alpha = 0 + + UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 1.0, initialSpringVelocity: 1.0, options: .curveEaseInOut, animations: { + self.transparentView.alpha = 0.5 + self.tableView.frame = CGRect(x: 0, y: screenSize.height - self.height, width: screenSize.width, height: self.height) + }, completion: nil) + } + + + @objc func onClickTransparentView() { + let screenSize = UIScreen.main.bounds.size + + UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 1.0, initialSpringVelocity: 1.0, options: .curveEaseInOut, animations: { + self.transparentView.alpha = 0 + self.tableView.frame = CGRect(x: 0, y: screenSize.height, width: screenSize.width, height: self.height) + }, completion: nil) + } + +} + + + + + +extension MyCoursesViewController: UITableViewDataSource { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + if tableView == MyCourseTableView { + return 2 + } + return settingArray.count + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + if tableView == MyCourseTableView { + let cell = tableView.dequeueReusableCell(withIdentifier: "MyCourseTableViewCell", for: indexPath) as! MyCourseTableViewCell + cell.headerLabel.text = "Competitive Programming" + cell.detailLabel.text = "Mentor:Apaar Kamal and 1 other" + cell.progressView.progress = 50 + cell.courseImage.image = UIImage(named: "courseImage") + return cell + } + else { + let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! CustomBottomSheetTableViewCell + cell.lbl.font = cell.lbl.font.withSize(20) + cell.lbl.text = settingArray[indexPath.row] + if indexPath.row == 0 { + cell.lbl.textColor = UIColor(red: 0.89, green: 0.482, blue: 0.34, alpha: 1) + } + cell.settingImage.image = UIImage(systemName: imageArray[indexPath.row]) + return cell + } + } + + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + return 75 + } + + +} diff --git a/CBOnlineIos/Presentation/ViewController.swift b/CBOnlineIos/Presentation/ViewController.swift deleted file mode 100644 index 40aac7b2..00000000 --- a/CBOnlineIos/Presentation/ViewController.swift +++ /dev/null @@ -1,41 +0,0 @@ - - -import UIKit -import Alamofire -import Japx - -class ViewController: UIViewController { - - let cardsDeckView = UIView() - - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view - let cardView = CourseCard(frame: .zero) - cardView.nameLabel.text = "Android Development" - - cardsDeckView.addSubview(cardView) - setupLayout() - - } - - // MARK:- Fileprivate - - fileprivate func setupLayout() { - view.backgroundColor = .white - let overallStackView = UIStackView(arrangedSubviews: [cardsDeckView]) - overallStackView.axis = .vertical - overallStackView.backgroundColor = .blue - view.addSubview(overallStackView) - overallStackView.anchor(top: view.safeAreaLayoutGuide.topAnchor, leading: view.leadingAnchor, bottom: view.safeAreaLayoutGuide.bottomAnchor, trailing: view.trailingAnchor) - overallStackView.isLayoutMarginsRelativeArrangement = true - overallStackView.layoutMargins = .init(top: 0, left: 12, bottom: 0, right: 12) - - overallStackView.bringSubviewToFront(cardsDeckView) - overallStackView.fillSuperview() - } - - -} - diff --git a/CBOnlineIos/Presentation/onboardingScreen .swift b/CBOnlineIos/Presentation/onboardingScreen .swift deleted file mode 100644 index 0b97feca..00000000 --- a/CBOnlineIos/Presentation/onboardingScreen .swift +++ /dev/null @@ -1,101 +0,0 @@ - - -import UIKit -class onboardingScreen: UIViewController,UIScrollViewDelegate { - @IBOutlet weak var scrollView: UIScrollView! - @IBOutlet weak var pageControl: UIPageControl! - @IBOutlet weak var browseCourse: UIButton! - @IBOutlet weak var login: UIButton! - - var scrollWidth: CGFloat! = 0.0 - var scrollHeight: CGFloat! = 0.0 - - override open var shouldAutorotate: Bool { - return false - } - //MARK: Data for the slides - //Slides Titles - var titles = ["Learn from the best in the industry","Learn on the go anytime, anywhere","Resolve all your doubts with TA's & Mentors"] - // Slides Description - var descs = ["Experienced, engaging instructors take you through course material, step by step, in our high-quality video lessons.","You can learn anytime anywhere with our all new iOS app. Download and save video offline.","Get exclusive access to Live Webinars where you interact with mentors for important course topics & can solve all your doubts."] - //Image assets - var imgs = ["intro1","intro2","intro3"] - - //get dynamic width and height of scrollview and save it - override func viewDidLayoutSubviews() { - scrollWidth = scrollView.frame.size.width - scrollHeight = scrollView.frame.size.height - } - override func viewDidLoad() { - - super.viewDidLoad() - self.view.layoutIfNeeded() - self.scrollView.delegate = self - scrollView.isPagingEnabled = true - scrollView.showsHorizontalScrollIndicator = false - scrollView.showsVerticalScrollIndicator = true - var frame = CGRect(x: 0, y: 0, width: 0, height: 0) - - for index in 0.. - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - + - + - + - + - + - - - - + + - - - + + + - - - - - - - - - - + + + + + + + + + + - + - - - - + + + + - + - + - + - - + + - + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - + + - - - - + + + + - + - - - + + - + - + - + - - + + - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - + - - - + + + - + - + - + - - + + - - - - - - - - - - - - - + + + + + + + + + + + + - + - - + + - + - + - + + + + + + + + + + + + + + + + + + + + + + diff --git a/CBOnlineIos/Views/ButtonBorderGradient.swift b/CBOnlineIos/Views/ButtonBorderGradient.swift deleted file mode 100644 index 1eb359a6..00000000 --- a/CBOnlineIos/Views/ButtonBorderGradient.swift +++ /dev/null @@ -1,368 +0,0 @@ - - -import UIKit - -@IBDesignable -class ButtonBorderGradient: UIButton { - - - private var borderWidth: CGFloat = 3 - var gradientLayer = CAGradientLayer() - var backgroundView = UIView() - - @IBInspectable - var leftGradientColor: UIColor? { - didSet { - setupView(leftGradientColor: leftGradientColor, rightGradientColor: rightGradientColor, - foregroundColor: backgroundColor) - } - } - - @IBInspectable - var rightGradientColor: UIColor? { - didSet { - setupView(leftGradientColor: leftGradientColor, rightGradientColor: rightGradientColor, - foregroundColor: backgroundColor) - } - } - - @IBInspectable - override var backgroundColor: UIColor? { - didSet { - setupView(leftGradientColor: leftGradientColor, rightGradientColor: rightGradientColor, - foregroundColor: backgroundColor) - } - } - - @IBInspectable - var cornerRadius: CGFloat { - get { - return layer.cornerRadius - } - set { - layer.cornerRadius = newValue - } - } - - - internal func setupView(leftGradientColor: UIColor?, rightGradientColor: UIColor?, - foregroundColor: UIColor?) { - - gradientLayer.removeFromSuperlayer() - gradientLayer = CAGradientLayer() - if let leftGradientColor = leftGradientColor, let rightGradientColor = rightGradientColor{ - gradientLayer.frame = bounds - gradientLayer.colors = [leftGradientColor.cgColor, rightGradientColor.cgColor] - gradientLayer.startPoint = CGPoint(x: 0.0, y: 0.5) - gradientLayer.endPoint = CGPoint(x: 1.0, y: 0.5) - layer.insertSublayer(gradientLayer, at: 0) - }else{ - gradientLayer.removeFromSuperlayer() - } - - - backgroundView.removeFromSuperview() - backgroundView = UIView() - backgroundView.isUserInteractionEnabled = false - backgroundView.translatesAutoresizingMaskIntoConstraints = false - insertSubview(backgroundView, at: 1) - backgroundView.backgroundColor = foregroundColor - backgroundView.fill(toView: self, space: UIEdgeInsets(space: borderWidth)) - - fb(cornerRadius) - } - - override func layoutSubviews() { - super.layoutSubviews() - } - - func fb(_ radius: CGFloat) { - cornerRadius = radius - createRoundCorner(radius) - backgroundView.createRoundCorner(radius - borderWidth) - } - - func createBorder(_ width: CGFloat) { - borderWidth = width - } -} - -extension UIView { - - func createRoundCorner(_ radius: CGFloat) { - layer.cornerRadius = radius - clipsToBounds = true - } -} -extension UIView { - - func addConstraint(attribute: NSLayoutConstraint.Attribute, equalTo view: UIView, toAttribute: NSLayoutConstraint.Attribute, multiplier: CGFloat = 1, constant: CGFloat = 0) -> NSLayoutConstraint { - - let myConstraint = NSLayoutConstraint(item: self, attribute: attribute, relatedBy: .equal, toItem: view, attribute: toAttribute, multiplier: multiplier, constant: constant) - return myConstraint - } - - func addConstraints(withFormat format: String, views: UIView...) { - - var viewsDictionary = [String: UIView]() - - for i in 0 ..< views.count { - let key = "v\(i)" - views[i].translatesAutoresizingMaskIntoConstraints = false - viewsDictionary[key] = views[i] - } - - addConstraints(NSLayoutConstraint.constraints(withVisualFormat: format, options: NSLayoutConstraint.FormatOptions(), metrics: nil, views: viewsDictionary)) - } - - @discardableResult - public func left(toAnchor anchor: NSLayoutXAxisAnchor, space: CGFloat = 0) -> NSLayoutConstraint { - let constraint = leftAnchor.constraint(equalTo: anchor, constant: space) - constraint.isActive = true - return constraint - } - - @discardableResult - public func left(toView view: UIView, space: CGFloat = 0) -> NSLayoutConstraint { - let constraint = leftAnchor.constraint(equalTo: view.leftAnchor, constant: space) - constraint.isActive = true - return constraint - } - - @discardableResult - public func right(toAnchor anchor: NSLayoutXAxisAnchor, space: CGFloat = 0) -> NSLayoutConstraint { - let constraint = rightAnchor.constraint(equalTo: anchor, constant: space) - constraint.isActive = true - return constraint - } - - @discardableResult - public func right(toView view: UIView, space: CGFloat = 0) -> NSLayoutConstraint { - let constraint = rightAnchor.constraint(equalTo: view.rightAnchor, constant: space) - constraint.isActive = true - return constraint - } - - @discardableResult - public func top(toAnchor anchor: NSLayoutYAxisAnchor, space: CGFloat = 0) -> NSLayoutConstraint { - let constraint = topAnchor.constraint(equalTo: anchor, constant: space) - constraint.isActive = true - return constraint - } - - @discardableResult - public func top(toView view: UIView, space: CGFloat = 0) -> NSLayoutConstraint { - let constraint = topAnchor.constraint(equalTo: view.topAnchor, constant: space) - constraint.isActive = true - return constraint - } - - @discardableResult - public func topLeft(toView view: UIView, top: CGFloat = 0, left: CGFloat = 0) -> [NSLayoutConstraint] { - - let topConstraint = self.top(toView: view, space: top) - let leftConstraint = self.left(toView: view, space: left) - - return [topConstraint, leftConstraint] - } - - @discardableResult - public func topRight(toView view: UIView, top: CGFloat = 0, right: CGFloat = 0) -> [NSLayoutConstraint] { - - let topConstraint = self.top(toView: view, space: top) - let rightConstraint = self.right(toView: view, space: right) - - return [topConstraint, rightConstraint] - } - - @discardableResult - public func bottomRight(toView view: UIView, bottom: CGFloat = 0, right: CGFloat = 0) -> [NSLayoutConstraint] { - - let bottomConstraint = self.bottom(toView: view, space: bottom) - let rightConstraint = self.right(toView: view, space: right) - - return [bottomConstraint, rightConstraint] - } - - @discardableResult - public func bottomLeft(toView view: UIView, bottom: CGFloat = 0, left: CGFloat = 0) -> [NSLayoutConstraint] { - - let bottomConstraint = self.bottom(toView: view, space: bottom) - let leftConstraint = self.left(toView: view, space: left) - - return [bottomConstraint, leftConstraint] - } - - @discardableResult - public func bottom(toAnchor anchor: NSLayoutYAxisAnchor, space: CGFloat = 0) -> NSLayoutConstraint { - let constraint = bottomAnchor.constraint(equalTo: anchor, constant: space) - constraint.isActive = true - return constraint - } - - @discardableResult - public func bottom(toView view: UIView, space: CGFloat = 0) -> NSLayoutConstraint { - let constraint = bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: space) - constraint.isActive = true - return constraint - } - - @discardableResult - public func verticalSpacing(toView view: UIView, space: CGFloat = 0) -> NSLayoutConstraint { - - let constraint = topAnchor.constraint(equalTo: view.bottomAnchor, constant: space) - constraint.isActive = true - return constraint - } - - @discardableResult - public func horizontalSpacing(toView view: UIView, space: CGFloat = 0) -> NSLayoutConstraint { - - let constraint = rightAnchor.constraint(equalTo: view.leftAnchor, constant: -space) - constraint.isActive = true - return constraint - } - - - public func size(_ size: CGSize) { - - widthAnchor.constraint(equalToConstant: size.width).isActive = true - heightAnchor.constraint(equalToConstant: size.height).isActive = true - - } - - public func size(toView view: UIView, greater: CGFloat = 0) { - widthAnchor.constraint(equalTo: view.widthAnchor, constant: greater).isActive = true - heightAnchor.constraint(equalTo: view.heightAnchor, constant: greater).isActive = true - } - - public func square(edge: CGFloat) { - - size(CGSize(width: edge, height: edge)) - } - - public func square() { - widthAnchor.constraint(equalTo: heightAnchor, multiplier: 1, constant: 0).isActive = true - } - - @discardableResult - public func width(_ width: CGFloat) -> NSLayoutConstraint { - let constraint = widthAnchor.constraint(equalToConstant: width) - constraint.isActive = true - return constraint - } - - @discardableResult - public func width(toDimension dimension: NSLayoutDimension, multiplier: CGFloat = 1, greater: CGFloat = 0) -> NSLayoutConstraint { - let constraint = widthAnchor.constraint(equalTo: dimension, multiplier: multiplier, constant: greater) - constraint.isActive = true - return constraint - } - - - @discardableResult - public func width(toView view: UIView, multiplier: CGFloat = 1, greater: CGFloat = 0) -> NSLayoutConstraint { - let constraint = widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: multiplier, constant: greater) - constraint.isActive = true - return constraint - } - - @discardableResult - public func height(_ height: CGFloat) -> NSLayoutConstraint { - let constraint = heightAnchor.constraint(equalToConstant: height) - constraint.isActive = true - return constraint - } - - @discardableResult - public func height(toDimension dimension: NSLayoutDimension, multiplier: CGFloat = 1, greater: CGFloat = 0) -> NSLayoutConstraint { - let constraint = heightAnchor.constraint(equalTo: dimension, multiplier: multiplier, constant: greater) - constraint.isActive = true - return constraint - } - - @discardableResult - public func height(toView view: UIView, multiplier: CGFloat = 1, greater: CGFloat = 0) -> NSLayoutConstraint { - let constraint = heightAnchor.constraint(equalTo: view.heightAnchor, multiplier: multiplier, constant: greater) - constraint.isActive = true - return constraint - } - - @discardableResult - public func centerX(toView view: UIView, space: CGFloat = 0) -> NSLayoutConstraint { - let constraint = centerXAnchor.constraint(equalTo: view.centerXAnchor, constant: space) - constraint.isActive = true - return constraint - } - - @discardableResult - public func centerX(toAnchor anchor: NSLayoutXAxisAnchor, space: CGFloat = 0) -> NSLayoutConstraint { - let constraint = centerXAnchor.constraint(equalTo: anchor, constant: space) - constraint.isActive = true - return constraint - } - - public func center(toView view: UIView, space: CGFloat = 0){ - centerX(toView: view, space: space) - centerY(toView: view, space: space) - } - - @discardableResult - public func centerY(toView view: UIView, space: CGFloat = 0) -> NSLayoutConstraint { - let constraint = centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: space) - constraint.isActive = true - return constraint - } - - @discardableResult - public func centerY(toAnchor anchor: NSLayoutYAxisAnchor, space: CGFloat = 0) -> NSLayoutConstraint { - let constraint = centerYAnchor.constraint(equalTo: anchor, constant: space) - constraint.isActive = true - return constraint - } - - - public func horizontal(toView view: UIView, space: CGFloat = 0) { - - leftAnchor.constraint(equalTo: view.leftAnchor, constant: space).isActive = true - rightAnchor.constraint(equalTo: view.rightAnchor, constant: -space).isActive = true - } - - public func horizontal(toView view: UIView, leftPadding: CGFloat, rightPadding: CGFloat) { - - leftAnchor.constraint(equalTo: view.leftAnchor, constant: leftPadding).isActive = true - rightAnchor.constraint(equalTo: view.rightAnchor, constant: rightPadding).isActive = true - } - - public func vertical(toView view: UIView, space: CGFloat = 0) { - - topAnchor.constraint(equalTo: view.topAnchor, constant: space).isActive = true - bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: -space).isActive = true - } - - public func vertical(toView view: UIView, topPadding: CGFloat, bottomPadding: CGFloat) { - - topAnchor.constraint(equalTo: view.topAnchor, constant: topPadding).isActive = true - bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: bottomPadding).isActive = true - } - - - public func fill(toView view: UIView, space: UIEdgeInsets = .zero) { - - left(toView: view, space: space.left) - right(toView: view, space: -space.right) - top(toView: view, space: space.top) - bottom(toView: view, space: -space.bottom) - } - - - -} - -extension UIEdgeInsets { - - init(space: CGFloat) { - self.init(top: space, left: space, bottom: space, right: space) - } -} - diff --git a/CBOnlineIos/Views/ButtonFillGradient.swift b/CBOnlineIos/Views/ButtonFillGradient.swift deleted file mode 100644 index 5ea17ad6..00000000 --- a/CBOnlineIos/Views/ButtonFillGradient.swift +++ /dev/null @@ -1,73 +0,0 @@ - - -import UIKit - -@IBDesignable -class ButtonFillGradient: UIButton { - let gradientLayer = CAGradientLayer() - - @IBInspectable - var leftGradientColor: UIColor? { - didSet { - setGradient(leftGradientColor: leftGradientColor, rightGradientColor: rightGradientColor) - } - } - - @IBInspectable - var rightGradientColor: UIColor? { - didSet { - setGradient(leftGradientColor: leftGradientColor, rightGradientColor: rightGradientColor) - } - } - - private func setGradient(leftGradientColor: UIColor?, rightGradientColor: UIColor?) { - if let leftGradientColor = leftGradientColor, let rightGradientColor = rightGradientColor { - gradientLayer.frame = bounds - gradientLayer.colors = [leftGradientColor.cgColor, rightGradientColor.cgColor] - gradientLayer.borderColor = layer.borderColor - gradientLayer.borderWidth = layer.borderWidth - gradientLayer.startPoint = CGPoint(x: 0.0, y: 0.5) - gradientLayer.endPoint = CGPoint(x: 1.0, y: 0.5) - gradientLayer.cornerRadius = layer.cornerRadius - layer.insertSublayer(gradientLayer, at: 0) - } else { - gradientLayer.removeFromSuperlayer() - } - } - @IBInspectable - var borderWidth: CGFloat { - get { - return layer.borderWidth - } - set { - layer.borderWidth = newValue - } - } - @IBInspectable - var borderColor: UIColor? { - get { - if let color = layer.borderColor { - return UIColor(cgColor: color) - } - return nil - } - set { - if let color = newValue { - layer.borderColor = color.cgColor - } else { - layer.borderColor = nil - } - } - } - - @IBInspectable - var cornerRadius: CGFloat { - get { - return layer.cornerRadius - } - set { - layer.cornerRadius = newValue - } - } - -} diff --git a/CBOnlineIos/Views/CourseCard.swift b/CBOnlineIos/Views/CourseCard.swift deleted file mode 100644 index b84ac032..00000000 --- a/CBOnlineIos/Views/CourseCard.swift +++ /dev/null @@ -1,36 +0,0 @@ - - -import UIKit - -class CourseCard: UIView { - - override init(frame: CGRect) { - super.init(frame: frame) - - setupLayout() - } - - let imageView = UIImageView(image: #imageLiteral(resourceName: "app_icon")) - let nameLabel = UILabel() - - - fileprivate func setupLayout() { - layer.cornerRadius = 10 - clipsToBounds = true - backgroundColor = .blue - let padding: CGFloat = 16 - let leftStackView = UIStackView(arrangedSubviews: [imageView,nameLabel]) - addSubview(leftStackView) - leftStackView.axis = .vertical - leftStackView.distribution = .fillEqually - leftStackView.spacing = padding - - - - } - - required init?(coder aDecoder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - -} diff --git a/CBOnlineIos/Views/CustomBottomSheetTableViewCell.swift b/CBOnlineIos/Views/CustomBottomSheetTableViewCell.swift new file mode 100644 index 00000000..93340ef6 --- /dev/null +++ b/CBOnlineIos/Views/CustomBottomSheetTableViewCell.swift @@ -0,0 +1,36 @@ +import UIKit + +class CustomBottomSheetTableViewCell: UITableViewCell { + + lazy var backView: UIView = { + let view = UIView(frame: CGRect(x: 0, y: 0, width: self.frame.width, height: 50)) + return view + }() + + lazy var settingImage: UIImageView = { + let imageView = UIImageView(frame: CGRect(x: 15, y: 10, width: 30, height: 30)) + imageView.contentMode = .scaleAspectFit + imageView.tintColor = UIColor(red: 0.89, green: 0.482, blue: 0.34, alpha: 1) + return imageView + }() + + lazy var lbl: UILabel = { + let lbl = UILabel(frame: CGRect(x: 60, y: 10, width: self.frame.width - 80, height: 30)) + return lbl + }() + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + } + + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + addSubview(backView) + backView.addSubview(settingImage) + backView.addSubview(lbl) + // Configure the view for the selected state + } + +} diff --git a/CBOnlineIos/Views/ProgressView.swift b/CBOnlineIos/Views/ProgressView.swift new file mode 100644 index 00000000..2884e629 --- /dev/null +++ b/CBOnlineIos/Views/ProgressView.swift @@ -0,0 +1,72 @@ +import Foundation +import UIKit + +class CustomHorizontalProgressView: UIView { + var progress: CGFloat = 0.0 { + + didSet { + setProgress() + } + } + + override init(frame: CGRect) { + super.init(frame: frame) + + setup() + } + + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + + setup() + } + + func setup() { + self.backgroundColor = UIColor.clear + } + + override func draw(_ rect: CGRect) { + super.draw(rect) + + setProgress() + } + + func setProgress() { + var progress = self.progress + progress = progress > 1.0 ? progress / 100 : progress + + self.layer.cornerRadius = self.frame.height / 2.0 + self.layer.borderColor = UIColor.gray.cgColor + self.layer.borderWidth = 1.0 + + let margin: CGFloat = 6.0 + var width = (self.frame.width - margin) * progress + let height = self.frame.height - margin + + if (width < height) { + width = height + } + + let path = UIBezierPath(roundedRect: CGRect(x: margin / 2.0, y: margin / 2.0, width: width, height: height),cornerRadius: height / 2.0) + + + let gradient: CAGradientLayer = CAGradientLayer() + gradient.frame = path.bounds + + if progress < 0.9 { + gradient.colors = [UIColor(red: 0.87, green: 0.43, blue: 0.38, alpha: 1).cgColor, UIColor(red: 0.937, green: 0.6, blue: 0.325, alpha: 1).cgColor] + } + + else { + gradient.colors = [UIColor(red: 0.513, green: 0.85, blue: 0.231, alpha: 1).cgColor, UIColor(red: 0.149, green: 0.658, blue: 0.486, alpha: 1).cgColor] + } + + gradient.startPoint = CGPoint(x: 0.0, y: 0.5) + gradient.endPoint = CGPoint(x: 1.0, y: 0.5) + gradient.cornerRadius = height / 2.0 + + self.layer.addSublayer(gradient) + + } +} + diff --git a/Podfile.lock b/Podfile.lock index 4b6891ef..d69dcab4 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,75 +1,77 @@ PODS: - - Alamofire (4.8.2) + - Alamofire (5.2.2) - FlagPhoneNumber (0.8.0): - FlagPhoneNumber/libPhoneNumberiOS (= 0.8.0) - FlagPhoneNumber/libPhoneNumberiOS (0.8.0) - - Japx (2.1.0): - - Japx/Core (= 2.1.0) - - Japx/Alamofire (2.1.0): - - Alamofire (~> 4.8) + - Japx (3.0.0): + - Japx/Core (= 3.0.0) + - Japx/Alamofire (3.0.0): + - Alamofire (~> 5.0) - Japx/Core - - Japx/Core (2.1.0) - - Kingfisher (5.5.0) - - LoadingShimmer (1.0.1) - - MaterialComponents/AnimationTiming (110.2.0) - - MaterialComponents/Availability (110.2.0) - - MaterialComponents/Elevation (110.2.0): + - Japx/Core (3.0.0) + - Kingfisher (5.14.1): + - Kingfisher/Core (= 5.14.1) + - Kingfisher/Core (5.14.1) + - LoadingShimmer (1.0.3) + - MaterialComponents/AnimationTiming (111.0.0) + - MaterialComponents/Availability (111.0.0) + - MaterialComponents/Elevation (111.0.0): - MaterialComponents/Availability - MaterialComponents/private/Color - MaterialComponents/private/Math - - MaterialComponents/NavigationDrawer (110.2.0): + - MaterialComponents/NavigationDrawer (111.0.0): - MaterialComponents/Elevation - MaterialComponents/Palettes - MaterialComponents/private/Math - MaterialComponents/private/UIMetrics - MaterialComponents/ShadowLayer - - MaterialComponents/Palettes (110.2.0) - - MaterialComponents/private/Application (110.2.0) - - MaterialComponents/private/Color (110.2.0): + - MaterialComponents/Palettes (111.0.0) + - MaterialComponents/private/Application (111.0.0) + - MaterialComponents/private/Color (111.0.0): - MaterialComponents/Availability - - MaterialComponents/private/Math (110.2.0) - - "MaterialComponents/private/TextControlsPrivate+BaseStyle (110.2.0)": + - MaterialComponents/private/Math (111.0.0) + - "MaterialComponents/private/TextControlsPrivate+BaseStyle (111.0.0)": - MaterialComponents/AnimationTiming - MaterialComponents/private/Math - "MaterialComponents/private/TextControlsPrivate+Shared" - - "MaterialComponents/private/TextControlsPrivate+FilledStyle (110.2.0)": + - "MaterialComponents/private/TextControlsPrivate+FilledStyle (111.0.0)": - MaterialComponents/AnimationTiming - MaterialComponents/Availability - MaterialComponents/private/Math - "MaterialComponents/private/TextControlsPrivate+Shared" - "MaterialComponents/private/TextControlsPrivate+UnderlinedStyle" - - "MaterialComponents/private/TextControlsPrivate+Shared (110.2.0)": + - "MaterialComponents/private/TextControlsPrivate+Shared (111.0.0)": - MaterialComponents/AnimationTiming - MaterialComponents/private/Math - "MaterialComponents/TextControls+Enums" - - "MaterialComponents/private/TextControlsPrivate+TextFields (110.2.0)": + - "MaterialComponents/private/TextControlsPrivate+TextFields (111.0.0)": - MaterialComponents/private/Math - "MaterialComponents/private/TextControlsPrivate+Shared" - - "MaterialComponents/private/TextControlsPrivate+UnderlinedStyle (110.2.0)": + - "MaterialComponents/private/TextControlsPrivate+UnderlinedStyle (111.0.0)": - MaterialComponents/AnimationTiming - MaterialComponents/Availability - MaterialComponents/private/Math - "MaterialComponents/private/TextControlsPrivate+Shared" - - MaterialComponents/private/UIMetrics (110.2.0): + - MaterialComponents/private/UIMetrics (111.0.0): - MaterialComponents/private/Application - - MaterialComponents/ShadowElevations (110.2.0) - - MaterialComponents/ShadowLayer (110.2.0): + - MaterialComponents/ShadowElevations (111.0.0) + - MaterialComponents/ShadowLayer (111.0.0): - MaterialComponents/ShadowElevations - - "MaterialComponents/TextControls+BaseTextAreas (110.2.0)": + - "MaterialComponents/TextControls+BaseTextAreas (111.0.0)": - "MaterialComponents/private/TextControlsPrivate+BaseStyle" - "MaterialComponents/private/TextControlsPrivate+Shared" - MDFInternationalization - - "MaterialComponents/TextControls+BaseTextFields (110.2.0)": + - "MaterialComponents/TextControls+BaseTextFields (111.0.0)": - "MaterialComponents/private/TextControlsPrivate+BaseStyle" - "MaterialComponents/private/TextControlsPrivate+Shared" - "MaterialComponents/private/TextControlsPrivate+TextFields" - MDFInternationalization - - "MaterialComponents/TextControls+Enums (110.2.0)" - - "MaterialComponents/TextControls+FilledTextAreas (110.2.0)": + - "MaterialComponents/TextControls+Enums (111.0.0)" + - "MaterialComponents/TextControls+FilledTextAreas (111.0.0)": - MaterialComponents/Availability - "MaterialComponents/private/TextControlsPrivate+FilledStyle" - "MaterialComponents/TextControls+BaseTextAreas" - - "MaterialComponents/TextControls+FilledTextFields (110.2.0)": + - "MaterialComponents/TextControls+FilledTextFields (111.0.0)": - MaterialComponents/Availability - "MaterialComponents/private/TextControlsPrivate+FilledStyle" - "MaterialComponents/TextControls+BaseTextFields" @@ -100,15 +102,15 @@ SPEC REPOS: - XLPagerTabStrip SPEC CHECKSUMS: - Alamofire: ae5c501addb7afdbb13687d7f2f722c78734c2d3 + Alamofire: 814429acc853c6c54ff123fc3d2ef66803823ce0 FlagPhoneNumber: 3712455b95f66cb0f2016fef7d9e34cddf8c7f9a - Japx: 4fbfa9c85c0d89e93d011b7ef55625a3de6a445e - Kingfisher: 6fe5e67a90fd335e49b0f5c075ff55ac5ebedd94 - LoadingShimmer: d01381d4965d6a87f12dffbb3f80eaf7990f156c - MaterialComponents: 7a6468f225881fe81f8a68cc49727209687f7b1e + Japx: d1f7f3e4b94f2013538102e96cf96fd417005f76 + Kingfisher: 8050bc6f7f68cbf3908bd04df7ccbac188f6d6d6 + LoadingShimmer: dd681218498ec9648f572b845a7299b9c62e8e30 + MaterialComponents: 533042da998b97ad13a6f544268f8026e8161cc5 MDFInternationalization: 010097556d6b09d2c4ea38e0820ea6d37be6a314 XLPagerTabStrip: 61c57fd61f611ee5f01ff1495ad6fbee8bf496c5 PODFILE CHECKSUM: 489848bc218f8184e2f6d5cd43cd88d51ac26670 -COCOAPODS: 1.9.1 +COCOAPODS: 1.9.0.beta.3