Files
Woka_Native_iOS/WOKA/Main/AuthFunc/AuthFuncTimeHandling.swift
BilalKhanWDI 33180a55ab - Icon setup on home screen in auto layout
- Added the LiveTv Moving View. Converted the timer into animation for the moving view.
- Made a Enum with custom functions to handle the time.
- Added logic to handle the dark grass for night time
- Rescaled the home grass so dark grass and light grass has identical dimensions
- Handled the night mode with white text for clear text
2024-05-23 19:27:34 +05:30

54 lines
1.9 KiB
Swift

//
// 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]
}
}