文章来源:淘论文网   发布者: 毕业设计   浏览量: 24



还可以点击去查询以下关键词:
[Swift]    [定制]    [SidePanel]    [【Swift】定制SidePanel]   

项目介绍:

SidePanel

Installation 安装方法CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

还米有安装cocoapods的同学,可以通过以下代码进行安装

$ gem install cocoapods

To integrate SidePanel into your Xcode project using CocoaPods, specify it in your Podfile:

支持使用cocoapods集成,论文,只需要在podfile文件中添加以下一行代码:

source 'https://github.com/CocoaPods/Specs.git' platform :ios, '9.0' use_frameworks! pod 'SidePanel'

Then, run the following command:

$ pod installCarthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:
通过以下代码安装 Carthage

$ brew update $ brew install carthage

To integrate SidePanel into your Xcode project using Carthage, specify it in your Cartfile:
通过 Carthage 安装SidePanel,开题报告,只需要在'Cartfile'中添加一行代码:

github 'fulldecent/SidePanel' ~> 0.1

Run carthage update to build the framework and drag the built SidePanel.framework into your Xcode project.

执行命令行语句:‘carthage update’ 并拖拽 SidePanel.framework 进入到Xcode项目中。

Usage 下面是具体执行代码://Override SidePanelController to provide a custom hamburger menu icon class MySidePanelController: SidePanelController { override func leftButton() -> UIButton { let frame = CGRectMake(0, 0, 20, 20) let button = UIButton(frame: frame) button.setImage(UIImage(named: 'menu'), forState: .Normal) return button } } //Initialise SidePanelController - AppDelegate.swift var sidePanelController: SidePanelController? var mainVC1: UINavigationController? var mainVC2: UINavigationController? func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { .... let mainVC1 = MainViewController() let sc = SideController() let sidePanelController = MySidePanelController(sideController: sc) sidePanelController.selectedViewController = mainVC1 self.window = UIWindow(frame: UIScreen.mainScreen().bounds) self.window?.rootViewController = svc self.window?.makeKeyAndVisible() self.sidePanelController = sidePanelController .... } //Handle navigation from SideController - SideViewController.swift class SideViewController: UITableViewController { override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { if let appDelegate = UIApplication.sharedApplication().delegate as? AppDelegate { let vc = indexPath.row == 0 ? appDelegate.mainVC1 : appDelegate.mainVC2 appDelegate.sidePanelController?.selectedViewController = vc } } }Author

Dushyant Bansal, dushyant37@gmail.com


这里还有:


还可以点击去查询:
[Swift]    [定制]    [SidePanel]    [【Swift】定制SidePanel]   

请扫码加微信 微信号:sj52abcd


下载地址: http://www.taolw.com/down/8701.docx
  • 上一篇:【Swift】HFCardCollectionViewLayout
  • 下一篇:高德地图显示模式,放大毕业设计,缩小,讯飞语音输入并绘制路线