欢迎光临
我们一直在努力

交互式过渡菜单管理器

建站超值云服务器,限时71元/月

交互式过渡菜单管理器

项目介绍:

项目简介

FlowingMenu

FlowingMenu提供了一个交互式过渡管理器来显示一个流动和弹跳效果的菜单。

环境需求:

iOS 8.0+
Xcode 8.0+
Swift 3.0+
使用方法

首先,导入FlowingMenu

import FlowingMenu
然后只需添加一个FlowingMenuTransitionManager对象作为一个你想要展示的视图控件的transitioningDelegate即可:

let flowingMenuTransitionManager = FlowingMenuTransitionManager()
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
let vc = segue.destination
vc.transitioningDelegate = flowingMenuTransitionManager
}
如果你想要交互式过渡,你需要实现FlowingMenuDelegate对象并定义需要手势交互的视图:

var menu: UIViewController?
override func viewDidLoad() {
super.viewDidLoad()
// Add the pan screen edge gesture to the current view
flowingMenuTransitionManager.setInteractivePresentationView(view)
// Add the delegate to respond to interactive transition events
flowingMenuTransitionManager.delegate = self
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
let vc = segue.destination
vc.transitioningDelegate = flowingMenuTransitionManager
// Add the left pan gesture to the menu
flowingMenuTransitionManager.setInteractiveDismissView(vc.view)
// Keep a reference of the current menu
menu = vc
}
// MARK: – FlowingMenu Delegate Methods
func flowingMenuNeedsPresentMenu(_ flowingMenu: FlowingMenuTransitionManager) {
performSegue(withIdentifier: “PresentSegueName”, sender: self)
}
func flowingMenuNeedsDismissMenu(_ flowingMenu: FlowingMenuTransitionManager) {
menu?.performSegue(withIdentifier: “DismissSegueName”, sender: self)
}

github地址:https://github.com/yannickl/FlowingMenu

code4app

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 交互式过渡菜单管理器
分享到: 更多 (0)