Files
Woka_Native_iOS/WOKA/Theme/Controller/ThemeOneVC.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

78 lines
2.3 KiB
Swift

//
// ThemeOneVC.swift
// WOKA
//
// Created by Bilal on 03/05/2024.
//
import UIKit
class ThemeOneVC: UIViewController {
@IBOutlet weak var gradientView: UIView!
@IBOutlet weak var cloud2: UIImageView!
@IBOutlet weak var cloud1: UIImageView!
@IBOutlet weak var liveTVView: UIView!
@IBOutlet weak var liveTvPlayer: UIView!
@IBOutlet weak var homeGrass: UIImageView!
@IBOutlet weak var nameLabel: UILabel!
@IBOutlet weak var welcomeLabel: LocalisedElementsLabel!
@IBOutlet weak var webSeriesView: UIStackView!
@IBOutlet var star: [UIImageView]!
@IBOutlet weak var moonImage: UIImageView!
var timer: Timer?
var vm = ThemeOneVM()
weak var delegate: ChildViewControllerDelegate?
deinit{
timer?.invalidate()
// Removing observers
NotificationCenter.default.removeObserver(self, name: UIApplication.didEnterBackgroundNotification, object: nil)
NotificationCenter.default.removeObserver(self, name: UIApplication.willEnterForegroundNotification, object: nil)
NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: K.NotificationCenterReloads.reloadTheme), object: nil)
}
override func viewDidLoad() {
super.viewDidLoad()
vm.vc = self
vm.initView()
}
// Define a function to customize tab bar item icon size
func customizeTabBarItemIconSize() {
// Get a reference to the tab bar controller
if let tabBarController = self.tabBarController {
// Loop through each tab bar item
for item in tabBarController.tabBar.items! {
// Adjust the image insets to increase the icon size
item.imageInsets = UIEdgeInsets(top: 2, left: -5, bottom: -8, right: -5)
item.titlePositionAdjustment.vertical = CGFloat(8)
}
}
}
@IBAction func barButtonTapped(_ sender: UIButton) {
self.sideMenuController?.revealMenu()
}
}
class NavigationController: UINavigationController {
open override var childForStatusBarHidden: UIViewController? {
return self.topViewController
}
open override var childForStatusBarStyle: UIViewController? {
return self.topViewController
}
}