48 lines
1.2 KiB
Swift
48 lines
1.2 KiB
Swift
//
|
|
// HomeVC.swift
|
|
// WOKA
|
|
//
|
|
// Created by Bilal on 03/05/2024.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
class HomeVC: UIViewController {
|
|
|
|
override func viewDidLoad() {
|
|
super.viewDidLoad()
|
|
// Do any additional setup after loading the view.
|
|
customizeTabBarItemIconSize()
|
|
}
|
|
|
|
// 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
|
|
}
|
|
}
|