//
// MyTabBarViewController.swift
// DeepBreathDemo2
//
// Created by zhengbing on 6/8/16.
// Copyright © 2016 zhengbing. All rights reserved.
//
import UIKit
class MyTabBarViewController: UITabBarController {
var myTabBarView : UIView?
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
// 比例化(宽:高 = 1.28 :1)计算 TabBar 高度,适配各种机型
let btnW: CGFloat = Tools .kWidth/5
// 1. 自定义TabBar的背景视图
self.myTabBarView = ({
let v = UIView (frame: CGRect(x: 0, y: CGRectGetHeight(self.view.bounds) - btnW/1.28, width: CGRectGetWidth(self.view.bounds), height: btnW/1.28))
v.backgroundColor = UIColor .clearColor()
return v
})()
self.view.addSubview(self.myTabBar
// MyTabBarViewController.swift
// DeepBreathDemo2
//
// Created by zhengbing on 6/8/16.
// Copyright © 2016 zhengbing. All rights reserved.
//
import UIKit
class MyTabBarViewController: UITabBarController {
var myTabBarView : UIView?
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
// 比例化(宽:高 = 1.28 :1)计算 TabBar 高度,适配各种机型
let btnW: CGFloat = Tools .kWidth/5
// 1. 自定义TabBar的背景视图
self.myTabBarView = ({
let v = UIView (frame: CGRect(x: 0, y: CGRectGetHeight(self.view.bounds) - btnW/1.28, width: CGRectGetWidth(self.view.bounds), height: btnW/1.28))
v.backgroundColor = UIColor .clearColor()
return v
})()
self.view.addSubview(self.myTabBar