歡迎加入QQ討論群258996829

導(dǎo)航工具欄庫Navigation Toolbar

發(fā)布時間:2018-08-20 17:02  回復(fù):0  查看:6497  感興趣:366  贊:8   最后回復(fù):2018-08-20 17:02  
導(dǎo)航工具欄庫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!)
  }
  
}

相關(guān)開源代碼

您還未登錄,請先登錄

熱門帖子

最新帖子

?