Tab Bar with Large Icons

前端 未结 3 605
清歌不尽
清歌不尽 2021-01-03 16:40

I am wondering if there is a way to accomplish a tab bar with only large icons, I have attached an image below for reference. I am not interested in creating my own tab bar

3条回答
  •  情话喂你
    2021-01-03 17:02

    To add to @limon's answer, if you want to change the height of the custom UITabBar, I found from another SO answer, sorry do not remember web link reference, the following code did the trick and locked it at the bottom as well, where I found with @limon's code the UITabBar was not position flush at bottom out of the box with his code:

    override func viewWillLayoutSubviews() {
        //UITabBar Height
        var tabFrame: CGRect = self.tabBar.frame
        tabFrame.size.height = 75
        tabFrame.origin.y = self.view.frame.size.height - 75
        self.tabBar.frame = tabFrame
    }
    

    Obviously you want to remove the similar code from limon's answer or maybe move his entire code snippet to viewWillLayoutSubviews I didn't try that, I called his code in my viewDidLoad

提交回复
热议问题