增加导航栏的高度并从底部绕圆?

时间:2019-08-07 06:20:29

标签: swift uinavigationbar navigationbar

是否可以使用默认导航栏创建下图所示的视图?还是我必须为此任务创建自定义视图?

enter image description here

添加带有标题i的左右按钮

Right button not showing after add left button and title

我在做:

 let height: CGFloat = 200
        let bounds = self.navigationController!.navigationBar.bounds
        self.navigationController?.navigationBar.frame = CGRect(x: 0, y: 0, width: bounds.width, height: bounds.height + height)
        self.navigationController?.navigationBar.barTintColor = UIColor.primaryColor

        let radius:CGFloat = 20.0
         self.navigationController?.navigationBar.clipsToBounds = true
         self.navigationController?.navigationBar.layer.cornerRadius = radius
        self.navigationController?.navigationBar.layer.maskedCorners = [.layerMinXMaxYCorner,.layerMaxXMaxYCorner]

结果: enter image description here

我无法增加导航栏的高度并使其从底部变圆。

请帮助

0 个答案:

没有答案