Skip to content
This repository was archived by the owner on Oct 14, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Classes/MMAlertView.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ typedef void(^MMPopupInputHandler)(NSString *text);
@interface MMAlertView : MMPopupView

@property (nonatomic, assign) NSUInteger maxInputLength; // default is 0. Means no length limit.
@property (nonatomic, assign) BOOL hidePassively; // default false. alertView will not hide by click item if true

- (instancetype) initWithInputTitle:(NSString*)title
detail:(NSString*)detail
Expand Down
6 changes: 4 additions & 2 deletions Classes/MMAlertView.m
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,16 @@ - (void)actionButton:(UIButton*)btn

if ( self.withKeyboard && (btn.tag==1) )
{
if ( self.inputView.text.length > 0 )
if ( self.inputView.text.length > 0 && !self.hidePassively)
{
[self hide];
}
}
else
{
[self hide];
if (!self.hidePassively) {
[self hide];
}
}

if ( self.inputHandler && (btn.tag>0) )
Expand Down
Binary file added MMPopupView/.DS_Store
Binary file not shown.