ZTModalShow 0.0.2

ZTModalShow 0.0.2

TQ-Seventeen维护。



  • 作者
  • yq-seventeen

ZTModalShow

ZTModalShow是一个简单而实用的模态显示库。

iPad screenshot

安装

CocoaPods

如果您正在使用CocoaPods,只需将pod 'ZTModalShow'添加到您的Podfile中。

拖放

只需将UIViewController+ModalShow.h+ UIViewController+ModalShow.m文件添加到您的项目中。如果您尚未启用ARC,您需要在.m源文件上设置-fobjc-arc编译器标志。

示例用法

首先你应该初始化一个自定义视图

self.customView                 = [UIView new];
self.customView.backgroundColor = [UIColor redColor];
请记住,你已经有设置宽度和高度了
(但不是那么多的~)
使用'ZTShowOptionDownToUp'和'ZTShowOptionUpToDown',你只需要设置'height'。
使用'ZTShowOptionLeftToRight'和'ZTShowOptionRightToLeft',你只需要设置'width'。
使用 'ZTShowOptionCenter' 时,需要设置 'width' 和 'height'
self.customView.frame           = CGRectMake(0, 0, 200, 200);

使 customview 弹出显示

ModalShowOption *option      = [ModalShowOption defaultOption];
option.showCover             = YES;
option.animationType         = ZTAnimationOptionEaseIn;
option.animationDurationTime = 0.2f;
option.showOption = ZTShowOptionDownToUp;
[self zt_showView:self.customView WithConfiguration:option];

关于 ZTModalShow 的更详细用法,请查看项目中的示例

要求

  • ARC
  • iOS 8.0 或更高版本
  • Xcode 7

联系方式

Seventeen-17

许可协议

ZTModalShow 在 MIT 许可证下可用。更多信息请参阅 LICENSE 文件。