Files
Woka_Native_iOS/WOKA/Theme/ViewModel/ThemeTwoVM.swift
BilalKhanWDI 0e921c3113 - Handled the star and moon to show only at the night time.
- Added a star above the grass and added it to the animation.
- Woke Client call 1:15 - 1:40
- Added Sidebar theme clicks and added userdefaults with checks for default loading. Also added to logout
- Handled the Theme change from sidebar, also handled the default theme selected and loading it at the time of startup
- Fixed issue of sidebar showing up, left side blacktint was not coming. It was the issue of ViewLifeCycle
- Theme 2  Explore woka items size ratio updated for auto layouts
- Worked on RootView Navigation.
2024-05-27 19:42:56 +05:30

33 lines
947 B
Swift

//
// ThemeTwoVM.swift
// WOKA
//
// Created by MacBook Pro on 27/05/24.
//
import UIKit
class ThemeTwoVM{
weak var vc : ThemeTwoVC!
var cellData = ["WokaFMT2", "LiveTVT2", "WebSeriesT2", "GamesT2", "AudioBooksT2", "KaraokeT2", "ShopT2"]
func initView(){
setupCell()
NotificationCenter.default.addObserver(self, selector: #selector(self.reloadTheme), name: NSNotification.Name(rawValue: K.NotificationCenterReloads.reloadTheme), object: nil)
}
// MARK: - Notification Center Handlers
@objc func reloadTheme(){
self.vc.delegate?.didPressSwitchButton(from: self.vc)
}
func setupCell(){
vc.collectionView.register(UINib(nibName: K.CellIdentifier.Theme.homeExploreCell, bundle: nil), forCellWithReuseIdentifier: K.CellIdentifier.Theme.homeExploreCell)
vc.collectionView.delegate = vc.self
vc.collectionView.dataSource = vc.self
}
}