CocoaPods trunk is moving to be read-only. Read more on the blog, there are 17 months to go.

AXViewControllerTransitioning 1.1.4

AXViewControllerTransitioning 1.1.4

Maintained by AXinger.



  • By
  • axinger

AXViewControllerTransitioning

CI Status Version License Platform

iShot2021-02-27 21 04 37iShot2021-02-27 21 05 48

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.