ImageOpenTransition 0.1.7

ImageOpenTransition 0.1.7

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布日期最后发布2016 年 10 月
SPM支持 SPM

Matan 维护。



  • YOURNAME

Awesome

ImageOpenTransition Icon

描述

Swift 编写的 ViewControllers 之间美丽且精确的图像过渡。

  • 支持多图像过渡

  • 只需简单地提供您希望过渡的 imageView,其余操作将自动完成

  • 无需深入研究过渡 API 来实现美丽的过渡

演示

ImageOpenTransition Icon ImageOpenTransition Icon

代码

let transitionObjectAvatar = ImageScaleTransitionObject(viewToAnimateFrom: cell.imgAvater,
                                                                    viewToAnimateTo: vc.imgAvatar,
                                                                    duration: 0.4)

//Example of explicitly defining a final frame:
let transitionObjectCover = ImageScaleTransitionObject(viewToAnimateFrom: cell.imgCover,
                                                                   viewToAnimateTo: vc.imgCover,
                                                                   duration: 0.4,
                                                                   frameToAnimateToCover)

self.imageScalePresentTransition = ImageScaleTransitionDelegate(transitionObjects: [transitionObjectCover ,transitionObjectAvatar], 
                                                                            usingNavigationController: usingNavigationController, 
                                                                            duration: 0.4)

使用

  • 为每个需要动画的图像创建“ImageScaleTransitionObject”。传递动画的起始的 UIImageView 和动画的终止的 UIImageView。

  • 您必须传递想要动画的 ImageView。您可以在控制器展示之前分配它,或调用“loadView”,选择权在您手中。

  • 您想要动画到的 frame 是可选的。在 ImageView 您想要动画到尚未具有 frame 的情况下,您可以使用它,并希望程序化计算它。

**请参考示例项目以获取更佳参考。

支持

Storyboard/非 Storyboard 半透明/不半透明 NavigationController/非 NavigationController

安装

手动

  1. 下载并将在您的项目中 /ImageOpenTransition 文件夹拖放到。
  2. 恭喜您!

作者

Matan 制作此项目。❤️.

许可证

Copyright 2013-2016 Jive Software, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    https://apache.ac.cn/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.