CGModelTransition
示例
要运行示例项目,请克隆仓库,然后从示例目录运行pod install
。
要求
安装
CGModelTransition可以通过CocoaPods获得。要安装它,只需将以下行添加到您的Podfile即可
pod 'CGModelTransition'
使用指南
#import <CGModelTransition/CGModelTransition.h>
@implementation CGTopViewController
- (instancetype)init
{
self = [super init];
if (self) {
CGModelTransitionController *transition = [[CGModelTransitionController alloc]initWithPresentedViewController:self];
transition.presentedContentSize = CGSizeMake(275, 230);;
transition.transitionAnimation = CGTransitionAnimationSlideFromTop;
transition.animateDuration = 1;
self.modelTransition = transition;
}
return self;
}
@end
CGTopViewController *vc = [CGTopViewController new];
[self presentViewController:vc animated:YES completion:nil];