File tree 2 files changed +3
-1
lines changed
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ typedef void(^CXAlertViewHandler)(CXAlertView *alertView);
47
47
@property (nonatomic , assign ) CGFloat bottomScrollViewHeight;
48
48
@property (nonatomic , assign ) BOOL showButtonLine;
49
49
@property (nonatomic , assign ) BOOL showBlurBackground;
50
+ @property (nonatomic , assign ) BOOL stackButtons;
50
51
// Create
51
52
- (id )initWithTitle : (NSString *)title message : (NSString *)message cancelButtonTitle : (NSString *)cancelButtonTitle ;
52
53
- (id )initWithTitle : (NSString *)title contentView : (UIView *)contentView cancelButtonTitle : (NSString *)cancelButtonTitle ;
Original file line number Diff line number Diff line change @@ -197,6 +197,7 @@ - (id)initWithTitle:(NSString *)title contentView:(UIView *)contentView cancelBu
197
197
198
198
_showButtonLine = YES ;
199
199
_showBlurBackground = YES ;
200
+ _stackButtons = YES ;
200
201
[self setupScrollViews ];
201
202
if (cancelButtonTitle) {
202
203
[self addButtonWithTitle: cancelButtonTitle type: CXAlertViewButtonTypeCancel handler: ^(CXAlertView *alertView, CXAlertButtonItem *button) {
@@ -803,7 +804,7 @@ - (void)addButtonWithTitle:(NSString *)title type:(CXAlertViewButtonType)type ha
803
804
CGFloat newContentWidth = self.bottomScrollView .contentSize .width + CGRectGetWidth (button.frame );
804
805
_bottomScrollView.contentSize = CGSizeMake ( newContentWidth, _bottomScrollView.contentSize .height );
805
806
}
806
- else if ([_buttons count ] == 1 )
807
+ else if ([_buttons count ] == 1 || !_stackButtons )
807
808
{
808
809
// correct first button
809
810
CXAlertButtonItem *firstButton = [_buttons objectAtIndex: 0 ];
You can’t perform that action at this time.
0 commit comments