项目介绍:
View2ViewTransition
https://github.com/naru-jpn/View2ViewTransition
DEMO 下载:
installation 安装方法
Carthage
github "naru-jpn/View2ViewTransition"
CocoaPods
pod ‘View2ViewTransition’
Usage使用方法创建 TransitionController 和继承实现接口
[Objective-C] 查看源文件 复制代码
// Create TransitionController var transitionController: TransitionController = TransitionController() // ... // Present view controller with transition delegate let presentedViewController: PresentedViewController = PresentedViewController() presentedViewController.transitioningDelegate = transitionController transitionController.present(viewController: presentedViewController, on: self, attached: presentedViewController, completion: nil)
Presenting viewController conforms View2ViewTransitionPresenting
[Objective-C] 查看源文件 复制代码
func initialFrame(userInfo: [String: AnyObject]?, isPresenting: Bool) -> CGRect func initialView(userInfo: [String: AnyObject]?, isPresenting: Bool) -> UIView func prepereInitialView(userInfo: [String: AnyObject]?, isPresenting: Bool) -> Void // (optional)
弹出的 viewController 符合 View2ViewTransition的过度效果
[Objective-C] 查看源文件 复制代码
func destinationFrame(userInfo: [String: AnyObject]?, isPresenting: Bool) -> CGRect func destinationView(userInfo: [String: AnyObject]?, isPresenting: Bool) -> UIView func prepareDestinationView(userInfo: [String: AnyObject]?, isPresenting: Bool) -> Void // (optional)
推荐阅读:
iOS启动页广告XHLaunchAd