diff --git a/WOKA.xcodeproj/project.pbxproj b/WOKA.xcodeproj/project.pbxproj index a920f37..ae04943 100644 --- a/WOKA.xcodeproj/project.pbxproj +++ b/WOKA.xcodeproj/project.pbxproj @@ -105,6 +105,9 @@ 52D774EF2BDFC50D001D87DE /* StringValidations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D774EE2BDFC50D001D87DE /* StringValidations.swift */; }; 52D774F12BDFC53B001D87DE /* StringSubScript.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D774F02BDFC53B001D87DE /* StringSubScript.swift */; }; 52FB2D8F2BDF898F0009B0C7 /* TextFieldPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52FB2D8E2BDF898F0009B0C7 /* TextFieldPadding.swift */; }; + 52FDBA782BFF23F4009D7AC7 /* TimePeriod.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52FDBA772BFF23F4009D7AC7 /* TimePeriod.swift */; }; + 52FDBA7B2BFF2712009D7AC7 /* AuthFuncTimeHandling.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52FDBA7A2BFF2712009D7AC7 /* AuthFuncTimeHandling.swift */; }; + 52FDBA7D2BFF481A009D7AC7 /* HomeVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52FDBA7C2BFF481A009D7AC7 /* HomeVM.swift */; }; 52FDDAB52BF34DC300E037C1 /* YesNoAlertVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52FDDAB42BF34DC300E037C1 /* YesNoAlertVC.swift */; }; 619A5A1BD8BD968ADC83C106 /* Pods_WOKA.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA543A4216400A2864E3D3E /* Pods_WOKA.framework */; }; 9C0A853F2BEE35340093783D /* ForgotPassDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C0A853E2BEE35340093783D /* ForgotPassDM.swift */; }; @@ -256,6 +259,9 @@ 52E7E0F62BDF7DD500C86E10 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/AuthenticationSB.strings; sourceTree = ""; }; 52E7E0F82BDF7DD900C86E10 /* hi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hi; path = hi.lproj/AuthenticationSB.strings; sourceTree = ""; }; 52FB2D8E2BDF898F0009B0C7 /* TextFieldPadding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextFieldPadding.swift; sourceTree = ""; }; + 52FDBA772BFF23F4009D7AC7 /* TimePeriod.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimePeriod.swift; sourceTree = ""; }; + 52FDBA7A2BFF2712009D7AC7 /* AuthFuncTimeHandling.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthFuncTimeHandling.swift; sourceTree = ""; }; + 52FDBA7C2BFF481A009D7AC7 /* HomeVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeVM.swift; sourceTree = ""; }; 52FDDAB42BF34DC300E037C1 /* YesNoAlertVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YesNoAlertVC.swift; sourceTree = ""; }; 9C0A853E2BEE35340093783D /* ForgotPassDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ForgotPassDM.swift; sourceTree = ""; }; 9C0A85402BEE35670093783D /* ResetPassUserNameVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResetPassUserNameVM.swift; sourceTree = ""; }; @@ -508,6 +514,7 @@ 525327D12BFCC1BC00F64283 /* Model */ = { isa = PBXGroup; children = ( + 52FDBA772BFF23F4009D7AC7 /* TimePeriod.swift */, ); path = Model; sourceTree = ""; @@ -523,6 +530,7 @@ isa = PBXGroup; children = ( 525327D52BFCC23600F64283 /* SideMenuVM.swift */, + 52FDBA7C2BFF481A009D7AC7 /* HomeVM.swift */, ); path = ViewModel; sourceTree = ""; @@ -665,6 +673,16 @@ path = GIF_JSON; sourceTree = ""; }; + 52FDBA792BFF26F9009D7AC7 /* AuthFunc */ = { + isa = PBXGroup; + children = ( + 9C27E1622BDB6F1900EC1DA9 /* AuthFunc.swift */, + 525327D82BFCDDF700F64283 /* AuthFuncStartupSoundHandling.swift */, + 52FDBA7A2BFF2712009D7AC7 /* AuthFuncTimeHandling.swift */, + ); + path = AuthFunc; + sourceTree = ""; + }; 9C27E15E2BDB6E4F00EC1DA9 /* Localized Module */ = { isa = PBXGroup; children = ( @@ -676,10 +694,9 @@ 9C27E1612BDB6F0F00EC1DA9 /* Main */ = { isa = PBXGroup; children = ( - 9C27E1622BDB6F1900EC1DA9 /* AuthFunc.swift */, + 52FDBA792BFF26F9009D7AC7 /* AuthFunc */, 523ED25D2BDA2BC700CFED02 /* AppDelegate.swift */, 523ED25F2BDA2BC700CFED02 /* SceneDelegate.swift */, - 525327D82BFCDDF700F64283 /* AuthFuncStartupSoundHandling.swift */, ); path = Main; sourceTree = ""; @@ -759,10 +776,10 @@ 9CBCB2A62BE5104F007D7934 /* Home */ = { isa = PBXGroup; children = ( - 525327D42BFCC1CF00F64283 /* Controller */, - 525327D32BFCC1C900F64283 /* ViewModel */, - 525327D22BFCC1C400F64283 /* View */, 525327D12BFCC1BC00F64283 /* Model */, + 525327D22BFCC1C400F64283 /* View */, + 525327D32BFCC1C900F64283 /* ViewModel */, + 525327D42BFCC1CF00F64283 /* Controller */, 9CBCB2A72BE5105A007D7934 /* Home.storyboard */, ); path = Home; @@ -1020,6 +1037,7 @@ 9CBCB2A32BE50C95007D7934 /* ResetPassUserNameVC.swift in Sources */, 52A3F6A52BECBA8D0000BB0B /* LinkedChildDM.swift in Sources */, 52A3F6AB2BECBF550000BB0B /* LinkedChildVC.swift in Sources */, + 52FDBA7B2BFF2712009D7AC7 /* AuthFuncTimeHandling.swift in Sources */, 9CBCB2A52BE50D49007D7934 /* NewPasswordVC.swift in Sources */, 9CBCB29F2BE4E13A007D7934 /* ValidatorClass.swift in Sources */, 522242592BFC73E40085C632 /* BasicTransitionAnimator.swift in Sources */, @@ -1046,6 +1064,7 @@ 522242622BFC73E40085C632 /* UIViewController+SideMenu.swift in Sources */, 5222425B2BFC73E40085C632 /* Preferences.swift in Sources */, 52C6E01E2BE3847F00E22D59 /* BorderView.swift in Sources */, + 52FDBA7D2BFF481A009D7AC7 /* HomeVM.swift in Sources */, 52C8B0742BDA7626003B51D0 /* OnBoardVC.swift in Sources */, 525953CF2BE8B28F00191286 /* Utilities.swift in Sources */, 9CBCB2A12BE4E50A007D7934 /* TextFieldPassword.swift in Sources */, @@ -1059,6 +1078,7 @@ 522242602BFC73E40085C632 /* UIView+Container.swift in Sources */, 522242612BFC73E40085C632 /* UIViewController+Container.swift in Sources */, 9C27E1652BDB6FBC00EC1DA9 /* StoryBoardID.swift in Sources */, + 52FDBA782BFF23F4009D7AC7 /* TimePeriod.swift in Sources */, 525954322BEA39D200191286 /* AddTapGesture.swift in Sources */, 522242682BFC74380085C632 /* TabBarVC.swift in Sources */, 9C27E1722BDB86B600EC1DA9 /* OnBoardCell.swift in Sources */, diff --git a/WOKA/Assets/Assets.xcassets/Home/AudioBooks.imageset/AudioBooks.png b/WOKA/Assets/Assets.xcassets/Home/AudioBooks.imageset/AudioBooks.png new file mode 100644 index 0000000..7118ebe Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/Home/AudioBooks.imageset/AudioBooks.png differ diff --git a/WOKA/Assets/Assets.xcassets/Home/AudioBooks.imageset/AudioBooks@2x.png b/WOKA/Assets/Assets.xcassets/Home/AudioBooks.imageset/AudioBooks@2x.png new file mode 100644 index 0000000..becf2f7 Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/Home/AudioBooks.imageset/AudioBooks@2x.png differ diff --git a/WOKA/Assets/Assets.xcassets/Home/AudioBooks.imageset/AudioBooks@3x.png b/WOKA/Assets/Assets.xcassets/Home/AudioBooks.imageset/AudioBooks@3x.png new file mode 100644 index 0000000..b269d04 Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/Home/AudioBooks.imageset/AudioBooks@3x.png differ diff --git a/WOKA/Assets/Assets.xcassets/Home/AudioBooks.imageset/Contents.json b/WOKA/Assets/Assets.xcassets/Home/AudioBooks.imageset/Contents.json new file mode 100644 index 0000000..899fe27 --- /dev/null +++ b/WOKA/Assets/Assets.xcassets/Home/AudioBooks.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "AudioBooks.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "AudioBooks@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "AudioBooks@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WOKA/Assets/Assets.xcassets/Home/FM.imageset/Contents.json b/WOKA/Assets/Assets.xcassets/Home/FM.imageset/Contents.json new file mode 100644 index 0000000..383c58a --- /dev/null +++ b/WOKA/Assets/Assets.xcassets/Home/FM.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "FM Logo Static_02 1.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WOKA/Assets/Assets.xcassets/Home/FM.imageset/FM Logo Static_02 1.png b/WOKA/Assets/Assets.xcassets/Home/FM.imageset/FM Logo Static_02 1.png new file mode 100644 index 0000000..515539d Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/Home/FM.imageset/FM Logo Static_02 1.png differ diff --git a/WOKA/Assets/Assets.xcassets/Home/Games.imageset/Contents.json b/WOKA/Assets/Assets.xcassets/Home/Games.imageset/Contents.json new file mode 100644 index 0000000..96b3cf2 --- /dev/null +++ b/WOKA/Assets/Assets.xcassets/Home/Games.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Games.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Games@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Games@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WOKA/Assets/Assets.xcassets/Home/Games.imageset/Games.png b/WOKA/Assets/Assets.xcassets/Home/Games.imageset/Games.png new file mode 100644 index 0000000..f8926b7 Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/Home/Games.imageset/Games.png differ diff --git a/WOKA/Assets/Assets.xcassets/Home/Games.imageset/Games@2x.png b/WOKA/Assets/Assets.xcassets/Home/Games.imageset/Games@2x.png new file mode 100644 index 0000000..3011263 Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/Home/Games.imageset/Games@2x.png differ diff --git a/WOKA/Assets/Assets.xcassets/Home/Games.imageset/Games@3x.png b/WOKA/Assets/Assets.xcassets/Home/Games.imageset/Games@3x.png new file mode 100644 index 0000000..77d0ba7 Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/Home/Games.imageset/Games@3x.png differ diff --git a/WOKA/Assets/Assets.xcassets/Home/HomeGrass.imageset/Shop@3x.png b/WOKA/Assets/Assets.xcassets/Home/HomeGrass.imageset/Shop@3x.png deleted file mode 100644 index 75dd4f1..0000000 Binary files a/WOKA/Assets/Assets.xcassets/Home/HomeGrass.imageset/Shop@3x.png and /dev/null differ diff --git a/WOKA/Assets/Assets.xcassets/Home/HomeGrassDay.imageset/Contents.json b/WOKA/Assets/Assets.xcassets/Home/HomeGrassDay.imageset/Contents.json new file mode 100644 index 0000000..0a815f4 --- /dev/null +++ b/WOKA/Assets/Assets.xcassets/Home/HomeGrassDay.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mountain.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WOKA/Assets/Assets.xcassets/Home/HomeGrassDay.imageset/mountain.png b/WOKA/Assets/Assets.xcassets/Home/HomeGrassDay.imageset/mountain.png new file mode 100644 index 0000000..5a925b2 Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/Home/HomeGrassDay.imageset/mountain.png differ diff --git a/WOKA/Assets/Assets.xcassets/Home/HomeGrassNight.imageset/Contents.json b/WOKA/Assets/Assets.xcassets/Home/HomeGrassNight.imageset/Contents.json new file mode 100644 index 0000000..81f1530 --- /dev/null +++ b/WOKA/Assets/Assets.xcassets/Home/HomeGrassNight.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mountainNight.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WOKA/Assets/Assets.xcassets/Home/HomeGrassNight.imageset/mountainNight.png b/WOKA/Assets/Assets.xcassets/Home/HomeGrassNight.imageset/mountainNight.png new file mode 100644 index 0000000..c505aba Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/Home/HomeGrassNight.imageset/mountainNight.png differ diff --git a/WOKA/Assets/Assets.xcassets/Home/Image.imageset/Contents.json b/WOKA/Assets/Assets.xcassets/Home/Image.imageset/Contents.json new file mode 100644 index 0000000..2235612 --- /dev/null +++ b/WOKA/Assets/Assets.xcassets/Home/Image.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Image@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WOKA/Assets/Assets.xcassets/Home/Image.imageset/Image@3x.png b/WOKA/Assets/Assets.xcassets/Home/Image.imageset/Image@3x.png new file mode 100644 index 0000000..a21b678 Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/Home/Image.imageset/Image@3x.png differ diff --git a/WOKA/Assets/Assets.xcassets/Home/Karaoke.imageset/Contents.json b/WOKA/Assets/Assets.xcassets/Home/Karaoke.imageset/Contents.json new file mode 100644 index 0000000..8a980af --- /dev/null +++ b/WOKA/Assets/Assets.xcassets/Home/Karaoke.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Karaoke.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Karaoke@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Karaoke@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WOKA/Assets/Assets.xcassets/Home/Karaoke.imageset/Karaoke.png b/WOKA/Assets/Assets.xcassets/Home/Karaoke.imageset/Karaoke.png new file mode 100644 index 0000000..b51e381 Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/Home/Karaoke.imageset/Karaoke.png differ diff --git a/WOKA/Assets/Assets.xcassets/Home/Karaoke.imageset/Karaoke@2x.png b/WOKA/Assets/Assets.xcassets/Home/Karaoke.imageset/Karaoke@2x.png new file mode 100644 index 0000000..1640efa Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/Home/Karaoke.imageset/Karaoke@2x.png differ diff --git a/WOKA/Assets/Assets.xcassets/Home/Karaoke.imageset/Karaoke@3x.png b/WOKA/Assets/Assets.xcassets/Home/Karaoke.imageset/Karaoke@3x.png new file mode 100644 index 0000000..ced8114 Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/Home/Karaoke.imageset/Karaoke@3x.png differ diff --git a/WOKA/Assets/Assets.xcassets/Home/LiveTV.imageset/Contents.json b/WOKA/Assets/Assets.xcassets/Home/LiveTV.imageset/Contents.json new file mode 100644 index 0000000..8ef8e24 --- /dev/null +++ b/WOKA/Assets/Assets.xcassets/Home/LiveTV.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "LiveTV.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "LiveTV@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "LiveTV@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WOKA/Assets/Assets.xcassets/Home/LiveTV.imageset/LiveTV.png b/WOKA/Assets/Assets.xcassets/Home/LiveTV.imageset/LiveTV.png new file mode 100644 index 0000000..ff37178 Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/Home/LiveTV.imageset/LiveTV.png differ diff --git a/WOKA/Assets/Assets.xcassets/Home/LiveTV.imageset/LiveTV@2x.png b/WOKA/Assets/Assets.xcassets/Home/LiveTV.imageset/LiveTV@2x.png new file mode 100644 index 0000000..041904f Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/Home/LiveTV.imageset/LiveTV@2x.png differ diff --git a/WOKA/Assets/Assets.xcassets/Home/LiveTV.imageset/LiveTV@3x.png b/WOKA/Assets/Assets.xcassets/Home/LiveTV.imageset/LiveTV@3x.png new file mode 100644 index 0000000..d161650 Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/Home/LiveTV.imageset/LiveTV@3x.png differ diff --git a/WOKA/Assets/Assets.xcassets/Home/LiveTVBaloon.imageset/Contents.json b/WOKA/Assets/Assets.xcassets/Home/LiveTVBaloon.imageset/Contents.json new file mode 100644 index 0000000..5c3cf6a --- /dev/null +++ b/WOKA/Assets/Assets.xcassets/Home/LiveTVBaloon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Live TV Balloon Icon (1).png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WOKA/Assets/Assets.xcassets/Home/LiveTVBaloon.imageset/Live TV Balloon Icon (1).png b/WOKA/Assets/Assets.xcassets/Home/LiveTVBaloon.imageset/Live TV Balloon Icon (1).png new file mode 100644 index 0000000..904b887 Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/Home/LiveTVBaloon.imageset/Live TV Balloon Icon (1).png differ diff --git a/WOKA/Assets/Assets.xcassets/Home/HomeGrass.imageset/Contents.json b/WOKA/Assets/Assets.xcassets/Home/LiveTVBorder.imageset/Contents.json similarity index 88% rename from WOKA/Assets/Assets.xcassets/Home/HomeGrass.imageset/Contents.json rename to WOKA/Assets/Assets.xcassets/Home/LiveTVBorder.imageset/Contents.json index 3496a3a..0fcd44e 100644 --- a/WOKA/Assets/Assets.xcassets/Home/HomeGrass.imageset/Contents.json +++ b/WOKA/Assets/Assets.xcassets/Home/LiveTVBorder.imageset/Contents.json @@ -9,7 +9,7 @@ "scale" : "2x" }, { - "filename" : "Shop@3x.png", + "filename" : "image 8.png", "idiom" : "universal", "scale" : "3x" } diff --git a/WOKA/Assets/Assets.xcassets/Home/LiveTVBorder.imageset/image 8.png b/WOKA/Assets/Assets.xcassets/Home/LiveTVBorder.imageset/image 8.png new file mode 100644 index 0000000..954161d Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/Home/LiveTVBorder.imageset/image 8.png differ diff --git a/WOKA/Assets/Assets.xcassets/Home/Shop.imageset/Contents.json b/WOKA/Assets/Assets.xcassets/Home/Shop.imageset/Contents.json new file mode 100644 index 0000000..f011106 --- /dev/null +++ b/WOKA/Assets/Assets.xcassets/Home/Shop.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Shop.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Shop@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Shop@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WOKA/Assets/Assets.xcassets/Home/Shop.imageset/Shop.png b/WOKA/Assets/Assets.xcassets/Home/Shop.imageset/Shop.png new file mode 100644 index 0000000..f7078ac Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/Home/Shop.imageset/Shop.png differ diff --git a/WOKA/Assets/Assets.xcassets/Home/Shop.imageset/Shop@2x.png b/WOKA/Assets/Assets.xcassets/Home/Shop.imageset/Shop@2x.png new file mode 100644 index 0000000..a5dfa7a Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/Home/Shop.imageset/Shop@2x.png differ diff --git a/WOKA/Assets/Assets.xcassets/Home/Shop.imageset/Shop@3x.png b/WOKA/Assets/Assets.xcassets/Home/Shop.imageset/Shop@3x.png new file mode 100644 index 0000000..c30e42b Binary files /dev/null and b/WOKA/Assets/Assets.xcassets/Home/Shop.imageset/Shop@3x.png differ diff --git a/WOKA/Authentication/Base.lproj/AuthenticationSB.storyboard b/WOKA/Authentication/Base.lproj/AuthenticationSB.storyboard index e2eee80..9481b36 100644 --- a/WOKA/Authentication/Base.lproj/AuthenticationSB.storyboard +++ b/WOKA/Authentication/Base.lproj/AuthenticationSB.storyboard @@ -43,25 +43,25 @@ - + - + - + @@ -80,7 +80,7 @@ - + - + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -435,11 +514,45 @@ - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -453,7 +566,57 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -462,20 +625,42 @@ + + + - + + + + + + + + + - + + + + + + + + + + - + + + @@ -495,6 +680,11 @@ + + + + + @@ -637,13 +827,22 @@ + + + + - + + + + + + diff --git a/WOKA/Home/Model/TimePeriod.swift b/WOKA/Home/Model/TimePeriod.swift new file mode 100644 index 0000000..e5ba18f --- /dev/null +++ b/WOKA/Home/Model/TimePeriod.swift @@ -0,0 +1,80 @@ +// +// TimePeriod.swift +// WOKA +// +// Created by MacBook Pro on 23/05/24. +// + +import UIKit + +// Enumeration representing different periods of the day, each with a start time, end time, and two colors. +enum TimePeriod : Equatable{ + // Enumeration cases for different periods of the day with associated values. + case morning(startTime: String, endTime: String, color1: UIColor, color2: UIColor, grass: String, textColor: UIColor) + case afternoon(startTime: String, endTime: String, color1: UIColor, color2: UIColor, grass: String, textColor: UIColor) + case evening(startTime: String, endTime: String, color1: UIColor, color2: UIColor, grass: String, textColor: UIColor) + case night(startTime: String, endTime: String, color1: UIColor, color2: UIColor, grass: String, textColor: UIColor) + + // Computed property to get the details of each time period as a tuple. + var details: (startTime: String, endTime: String, color1: UIColor, color2: UIColor, grass: String, textColor: UIColor) { + switch self { + case .morning(let startTime, let endTime, let color1, let color2, let grass, let textColor): + return (startTime, endTime, color1, color2, grass, textColor) + case .afternoon(let startTime, let endTime, let color1, let color2, let grass, let textColor): + return (startTime, endTime, color1, color2, grass, textColor) + case .evening(let startTime, let endTime, let color1, let color2, let grass, let textColor): + return (startTime, endTime, color1, color2, grass, textColor) + case .night(let startTime, let endTime, let color1, let color2, let grass, let textColor): + return (startTime, endTime, color1, color2, grass, textColor) + } + } + + // Function to check if a given current time falls within the time period. + func contains(currentTime: Date) -> Bool { + let formatter = DateFormatter() + formatter.dateFormat = "HH:mm" + guard let start = formatter.date(from: details.startTime), + let end = formatter.date(from: details.endTime) else { return false } + + return isTime(currentTime, between: start, and: end) + } + + // Equatable protocol conformance to compare two TimePeriod instances. + static func ==(lhs: TimePeriod, rhs: TimePeriod) -> Bool { + switch (lhs, rhs) { + case let (.morning(startTime1, endTime1, color11, color12, grass1, textColor1), .morning(startTime2, endTime2, color21, color22, grass2, textColor2)), + let (.afternoon(startTime1, endTime1, color11, color12, grass1, textColor1), .afternoon(startTime2, endTime2, color21, color22, grass2, textColor2)), + let (.evening(startTime1, endTime1, color11, color12, grass1, textColor1), .evening(startTime2, endTime2, color21, color22, grass2, textColor2)), + let (.night(startTime1, endTime1, color11, color12, grass1, textColor1), .night(startTime2, endTime2, color21, color22, grass2, textColor2)): + return startTime1 == startTime2 && endTime1 == endTime2 && color11 == color21 && color12 == color22 && grass1 == grass2 && textColor1 == textColor2 + default: + return false + } + } + + // Helper function to check if a given time falls between a start and end time. + func isTime(_ time: Date, between startTime: Date, and endTime: Date) -> Bool { + let calendar = Calendar.current + let currentComponents = calendar.dateComponents([.hour, .minute], from: time) + let startComponents = calendar.dateComponents([.hour, .minute], from: startTime) + let endComponents = calendar.dateComponents([.hour, .minute], from: endTime) + + guard let currentHour = currentComponents.hour, let currentMinute = currentComponents.minute, + let startHour = startComponents.hour, let startMinute = startComponents.minute, + let endHour = endComponents.hour, let endMinute = endComponents.minute else { + return false + } + + let currentTotalMinutes = currentHour * 60 + currentMinute + let startTotalMinutes = startHour * 60 + startMinute + let endTotalMinutes = endHour * 60 + endMinute + + if startTotalMinutes <= endTotalMinutes { + // Regular case where the time period does not cross midnight. + return currentTotalMinutes >= startTotalMinutes && currentTotalMinutes <= endTotalMinutes + } else { + // Special case where the time period crosses midnight. + return currentTotalMinutes >= startTotalMinutes || currentTotalMinutes <= endTotalMinutes + } + } +} diff --git a/WOKA/Home/ViewModel/HomeVM.swift b/WOKA/Home/ViewModel/HomeVM.swift new file mode 100644 index 0000000..9a3fbaf --- /dev/null +++ b/WOKA/Home/ViewModel/HomeVM.swift @@ -0,0 +1,111 @@ +// +// HomeVM.swift +// WOKA +// +// Created by MacBook Pro on 23/05/24. +// + +import UIKit + +class HomeVM{ + + weak var vc : HomeVC! + + func initView(){ + AuthFunc.shareInstance.initTimePeriods() + startInitialTimer() + addTapGestureToMovingView() + } + + // MARK: - LiveTV Tap Handling + + private func addTapGestureToMovingView(){ + let tap = UITapGestureRecognizer(target: self, action: #selector(self.handleTap(_:))) + vc.liveTVView.addGestureRecognizer(tap) + vc.liveTVView.isUserInteractionEnabled = true + } + + // function which is triggered when handleTap is called + @objc func handleTap(_ sender: UITapGestureRecognizer) { + print("tapped") +// let vc = self.storyboard?.instantiateViewController(identifier: "ViewController") as! ViewController +// +// DispatchQueue.main.async { +// do { +// // Create a JWMediaTrack with the thumbnails .vtt file +// // let thumbnailTrack = try JWThumbnailTrackBuilder() +// // .file(URL(string:"https://content.jwplatform.com/videos/Agy4RIje-Ysj2G4DQ.mp4")!) +// // .build() +// +// // Create a JWPlayerItem +// let item = try JWPlayerItemBuilder() +// .file(URL(string:self.videoStreamURL)!) +// .title("Testing Title") +// .posterImage(URL(string: "https://img.freepik.com/free-photo/painting-mountain-lake-with-mountain-background_188544-9126.jpg")!) +// // .mediaTracks([thumbnailTrack]) +// .build() +// +// // Create a config, and give it the item as a playlist. +// let config = try JWPlayerConfigurationBuilder() +// .playlist(items: [item]) +// .autostart(true) +// .preload(.auto) +// .repeatContent(true) +// .build() +// +// vc.config = config +// } +// catch { +// // Handle Error +// } +// vc.dismissTapped = self.tapped +// +// vc.modalPresentationStyle = .overFullScreen +// self.present(vc, animated: false) { +// self.stopLiveStream() +// vc.transitionToFullScreen(animated: true) { +// print("FullScreen") +// } +//// vc.setDeviceOrientation(orientation: .landscapeRight) +// } +//// self.navigationController?.pushViewController(vc, animated: true) +// } + + } + // MARK: - Handle Time Change + + @objc func handleBackground(){ + let currentTime = Date() + + for period in AuthFunc.shareInstance.timePeriods { + if period.contains(currentTime: currentTime) { + let details = period.details + // Update view's background color with a gradient or single color + vc.gradientView.applyGradient(colors: [details.color1, details.color2], startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0, y: 0.8)) + vc.nameLabel.textColor = details.textColor + vc.welcomeLabel.textColor = details.textColor + vc.homeGrass.image = UIImage(named: details.grass) + break + } + } + } + + func startInitialTimer() { + self.handleBackground() + let now = Date() + let nextMinute = Calendar.current.nextDate(after: now, matching: DateComponents(second: 0), matchingPolicy: .nextTime)! + let timeInterval = nextMinute.timeIntervalSince(now) + + // Schedule the initial timer to fire at the start of the next minute + vc.timer = Timer.scheduledTimer(timeInterval: timeInterval, target: self, selector: #selector(startRepeatingTimer), userInfo: nil, repeats: false) + } + + @objc func startRepeatingTimer() { + // Handle the minute change when the initial timer fires + self.handleBackground() + + // Schedule the repeating timer to fire every minute + vc.timer = Timer.scheduledTimer(timeInterval: 60, target: self, selector: #selector(handleBackground), userInfo: nil, repeats: false) + } + +} diff --git a/WOKA/Main/AppDelegate.swift b/WOKA/Main/AppDelegate.swift index 9a4b4c4..27d610c 100644 --- a/WOKA/Main/AppDelegate.swift +++ b/WOKA/Main/AppDelegate.swift @@ -33,7 +33,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { configureSideBar() return true } - + // MARK: UISceneSession Lifecycle func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { diff --git a/WOKA/Main/AuthFunc.swift b/WOKA/Main/AuthFunc/AuthFunc.swift similarity index 95% rename from WOKA/Main/AuthFunc.swift rename to WOKA/Main/AuthFunc/AuthFunc.swift index 17c2f2b..23bb80e 100644 --- a/WOKA/Main/AuthFunc.swift +++ b/WOKA/Main/AuthFunc/AuthFunc.swift @@ -30,6 +30,9 @@ class AuthFunc{ // Singleton instance of AuthFunc static let shareInstance = AuthFunc() + //Handling Time Changes on Home + var timePeriods = [TimePeriod]() + // Returns the device's UUID func getDeviceUUID() -> String{ /* diff --git a/WOKA/Main/AuthFuncStartupSoundHandling.swift b/WOKA/Main/AuthFunc/AuthFuncStartupSoundHandling.swift similarity index 100% rename from WOKA/Main/AuthFuncStartupSoundHandling.swift rename to WOKA/Main/AuthFunc/AuthFuncStartupSoundHandling.swift diff --git a/WOKA/Main/AuthFunc/AuthFuncTimeHandling.swift b/WOKA/Main/AuthFunc/AuthFuncTimeHandling.swift new file mode 100644 index 0000000..2245f62 --- /dev/null +++ b/WOKA/Main/AuthFunc/AuthFuncTimeHandling.swift @@ -0,0 +1,53 @@ +// +// AuthFuncTimeHandling.swift +// WOKA +// +// Created by MacBook Pro on 23/05/24. +// + +import UIKit + +extension AuthFunc{ + + func initTimePeriods(){ + // Define the time periods + let morning = TimePeriod.morning( + startTime: "06:00", + endTime: "11:00", + color1: #colorLiteral(red: 0.6509803922, green: 0.8862745098, blue: 0.8196078431, alpha: 1), + color2: #colorLiteral(red: 0.9529411765, green: 0.9843137255, blue: 0.7137254902, alpha: 1), + grass: "HomeGrassDay", + textColor : UIColor.appColor(.TextDarkBlue)! + ) + + let afternoon = TimePeriod.afternoon( + startTime: "11:01", + endTime: "16:30", + color1: #colorLiteral(red: 0.1333333333, green: 0.7294117647, blue: 0.9960784314, alpha: 1), + color2: #colorLiteral(red: 0.5921568627, green: 0.9098039216, blue: 0.9960784314, alpha: 1), + grass: "HomeGrassDay", + textColor : UIColor.appColor(.TextDarkBlue)! + ) + + let evening = TimePeriod.evening( + startTime: "16:31", + endTime: "18:30", + color1: #colorLiteral(red: 0.8196078431, green: 0.3333333333, blue: 0.4705882353, alpha: 1), + color2: #colorLiteral(red: 1, green: 0.7764705882, blue: 0.4, alpha: 1), + grass: "HomeGrassDay", + textColor : UIColor.appColor(.TextDarkBlue)! + ) + + let night = TimePeriod.night( + startTime: "18:31", + endTime: "05:59", + color1: #colorLiteral(red: 0.2705882353, green: 0.2156862745, blue: 0.5176470588, alpha: 1), + color2: #colorLiteral(red: 0.3764705882, green: 0.3803921569, blue: 0.7843137255, alpha: 1), + grass: "HomeGrassNight", + textColor : UIColor.white + ) + + self.timePeriods = [morning,afternoon,evening,night] + } + +}