Charleene 1.0

Charleene 1.0

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
发布上次发布2016年5月

Kersten Broich 维护。



iOS - UIModalPresentationFormSheet 用于 iPhone

Charleene 是将 UIModalPresentationFormSheet(在 iPad 上作为系统 API 功能所知)移植到 iPhone 的简单、现代和轻量级解决方案。

Charleene 可以接收任何 UIViewController 作为父 UIViewController 并以模态方式展示它。

当 Charleene 在 iPad 上使用时,它会调用 iOS 系统 API 的 UIModalPresentationFormSheet。

示例

用法

要运行示例项目,请克隆仓库,然后首先从 Example 目录运行 pod install

引用

在实现文件中将相应的类别包含在 UIViewController 中

#import "UIViewController+Charleene.h"

展示

用法很简单

从 Storyboard

ViewControllerOfYourChoice *vc = [[UIStoryboard storyboardWithName:@“Main” bundle:nil] instantiateViewControllerWithIdentifier:@“ViewControllerOfYourChoice”];
[self presentCharleeneModally:vc transitionMode:KSModalTransitionModeFromBottom];

从代码

ViewControllerOfYourChoice *vc = [[ViewControllerOfYourChoice alloc] init];    
[self presentCharleeneModally:vc transitionMode:KSModalTransitionModeFromBottom];

消失

消失很简单,只需在任何 UIViewController 上调用以下方法即可

[self dismissCharleeneAnimated:YES completion:nil];

要求

iOS7.x / iOS 8.x

安装

Charleene 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中

pod "Charleene"

变更日志

版本 1.0 新增功能

  • 没有功能更新 - 只纠正了一些错误并释放了稳定的 1.0 版本

作者

Kersten Broich,[email protected]

许可证

Charleene 在 MIT 许可证下提供。有关更多信息,请参阅 LICENSE 文件。