AXViewControllerTransitioning
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Requirements
Installation
AXViewControllerTransitioning is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'AXViewControllerTransitioning'
UIViewController 自定义 转场动画,封装与UIAlertViewController效果一样,遵循MVC模式
#import <AXAlertTransitioningObserver/UIViewController+AXTransitioning.h>
- 在对应ViewControlle 重写此方法
- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
[self ax_alertObserver:^(AXAlertTransitioningObserver *observer) {
observer.alertControllerStyle = AXAlertControllerStyleCentre;
}];
}
return self;
}
/// 调用者自控制是否点击空白页面 消失
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
[self dismissViewControllerAnimated:YES completion:nil];
}
Author
axinger, [email protected]
License
AXViewControllerTransitioning is available under the MIT license. See the LICENSE file for more info.