欢迎加入QQ讨论群258996829

导航工具栏库Navigation Toolbar

发布时间:2018-08-20 17:02  回复:0  查看:1063  感兴趣:183  赞:3   最后回复:2018-08-20 17:02  
导航工具栏库Navigation Toolbar

示例代码:
class ViewController: UIViewController {

  private var navigationView: NavigationView?

  override func viewDidLoad() {
    super.viewDidLoad()

    navigationView = NavigationView.init(frame: view.bounds,
                                    middleView: MiddleView(),
                                       screens: [
                                                 ScreenObject(title: "MUSIC",
                                                         startColor: .red,
                                                           endColor: .blue,
                                                              image: UIImage(named : "image1")!,
                                                         controller: YourFirstViewController()),
                                                         
                                                 ScreenObject(title: "EDUCATION",
                                                         startColor: .black,
                                                           endColor: .white,
                                                              image: UIImage(named : "image2")!,
                                                         controller: YourSecondViewController()),
                                                ],
                               backgroundImage: #imageLiteral(resourceName: "background"))
                               
    navigationView?.autoresizingMask = [.flexibleWidth, .flexibleHeight]
    view.addSubview(navigationView!)
  }
  
}

相关开源代码

您还未登录,请先登录

热门帖子

最新帖子