GuiminChu/ShrinkPresentation

语言: Swift

git: https://github.com/GuiminChu/ShrinkPresentation

一种在模态呈现新视图时收缩前一个视图控制器的方法。
A way to shrink the previous view controller when presenting a new one modally.
README.md (中文)

ShrinkPresentation

ShrinkPresentation可以在以模态方式呈现新视图控制器时轻松缩小以前的视图控制器。

截图

Screenshot

要求

  • iOS 8.0+
  • Xcode 7

积分

CocoaPods(iOS 8+)

您可以使用Cocoapods将ShrinkPresentation添加到您的Podfile中来安装:

platform :ios, '8.0'
use_frameworks!

target 'MyApp' do
    pod 'ShrinkPresentation', '~> 0.1.2'
end

手动(iOS 8+)

克隆repo并将Source文件夹下的文件添加到项目中。

用法

将您呈现的视图控制器作为ShrinkViewController的子类并像往常一样呈现它。

import ShrinkPresentation

class MenuViewController: ShrinkViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
    }
}

执照

ShrinkPresentation在MIT许可下发布。有关详细信息,请参阅LICENSE。

本文使用googletrans自动翻译,仅供参考, 原文来自github.com

en_README.md

ShrinkPresentation

ShrinkPresentation makes it easy to shrink the previous view controller when presenting a new one modally.

Screenshot

Screenshot

Requirements

  • iOS 8.0+
  • Xcode 7

Integration

CocoaPods (iOS 8+)

You can use Cocoapods to install ShrinkPresentationby adding it to your Podfile:

platform :ios, '8.0'
use_frameworks!

target 'MyApp' do
    pod 'ShrinkPresentation', '~> 0.1.2'
end

Manually (iOS 8+)

Clone the repo and add files under Source folder to your project.

Usage

Make your presented view controller as a subclass of ShrinkViewController and present it as usual.

import ShrinkPresentation

class MenuViewController: ShrinkViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
    }
}

License

ShrinkPresentation is released under the MIT license. See LICENSE for details.