To run the example project, clone the repo, and run pod install
from the Example directory first.
LYBasePopView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'LYBasePopView', :git => "https://github.com/Young1006/LYBasePopView.git", :tag => "0.2.0"
PopView *pop = [[PopView alloc] initWithFrame:CGRectMake(0, [UIScreen mainScreen].bounds.size.height, [UIScreen mainScreen].bounds.size.width, 400) overlayView:inView];
pop.clickBlock = clickBlock;
pop.animationTime = 0.25;
pop.colorAlpha = 0.15;
pop.hiddenForTouchEmpty = YES;
pop.shouldHideWhenDragging = YES;
[pop showAnimation];
/// 弹窗载体背景颜色alpha值(默认值0.15)
@property (nonatomic, assign) CGFloat colorAlpha;
/// 弹窗圆角(默认10.0)
@property (nonatomic, assign) CGFloat radius;
/// 弹窗圆角方向(默认UIRectCornerTopLeft | UIRectCornerTopRight)
@property (nonatomic, assign) UIRectCorner corner;
/// 弹出方向 (默认LYBasePopViewAnimationDirectionBottom)
@property (nonatomic, assign) LYBasePopViewAnimationDirection direction;
/// 弹窗动画时长
@property (nonatomic, assign) CGFloat animationTime;
/// 点击空白是否消失(默认YES)
@property (nonatomic, assign, getter=isHiddenForTouchEmpty) BOOL hiddenForTouchEmpty;
/// 是否支持拖拽关闭弹窗(默认YES, 不支持LYBasePopViewAnimationDirectionCenter)
@property (nonatomic, assign, getter=isShouldHideWhenDragging) BOOL shouldHideWhenDragging;
LYBasePopView is available under the MIT license. See the LICENSE file for more info.