是否可以使用默认导航栏创建下图所示的视图?还是我必须为此任务创建自定义视图?
添加带有标题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]
我无法增加导航栏的高度并使其从底部变圆。
请帮助