01常用设置
透明度:homeNav.navigationBar.translucent = true
修改大小UINavigationBar
//self.navigationController.navigationBar.frame = CGRectMake(0, 20, 320, 100);
自定义一个导航条别修改他的颜色:
var customBar = UIView()
函数设置
//4.MARK:创建导航条
func createCustomNavigationBar()
{
customBar = UIView(frame: CGRectMake(0, 0, ScreenWidth, NavigationH))
customBar.alpha = 1.0
customBar.layer.zPosition = 2.0
customBar.backgroundColor = UIColor(patternImage: UIImage(named: "nav_bg_iphone5")!)
self.view.addSubview(customBar)
func createCustomNavigationBar()
{
customBar = UIView(frame: CGRectMake(0, 0, ScreenWidth, NavigationH))
customBar.alpha = 1.0
customBar.layer.zPosition = 2.0
customBar.backgroundColor = UIColor(patternImage: UIImage(named: "nav_bg_iphone5")!)
self.view.addSubview(customBar)
}

浙公网安备 33010602011771号