Skip to content

Commit

Permalink
v1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
adad184 committed Jan 10, 2016
1 parent 20a5cfe commit 4d8bd68
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
4 changes: 4 additions & 0 deletions Classes/MMPopupView.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
//

#import <UIKit/UIKit.h>
#import "MMPopupItem.h"
#import "MMPopupWindow.h"
#import "MMPopupCategory.h"
#import "MMPopupDefine.h"

typedef NS_ENUM(NSUInteger, MMPopupType) {
MMPopupTypeAlert,
Expand Down
4 changes: 2 additions & 2 deletions MMPopupView.podspec
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Pod::Spec.new do |s|
s.name = "MMPopupView"
s.version = "1.5.3"
s.version = "1.6"
s.summary = "Pop-up based view(e.g. AlertView SheetView), or you can easily customize for your own usage."
s.homepage = "https://github.com/adad184/MMPopupView"
s.license = { :type => 'MIT License', :file => 'LICENSE' }
s.author = { "adad184" => "[email protected]" }
s.source = { :git => "https://github.com/adad184/MMPopupView.git", :tag => "1.5.3" }
s.source = { :git => "https://github.com/adad184/MMPopupView.git", :tag => "1.6" }
s.platform = :ios, '7.0'
s.source_files = 'Classes/*.{h,m}'
s.requires_arc = true
Expand Down
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ MMPopupView

[中文介绍](http://adad184.com/2015/09/08/opensource-mmpopupview/)

A basic Pop-Up Kit allows you to easily create Pop-Up view. You can focus on the only view you want to show.
A basic Pop-Up Kit allows you to easily create Pop-Up view. You can focus on the only view you want to show.

Besides, it comes with 2 common Pop-Up view, **MMAlertView** & **MMSheetView**. You can easily use & customize it.

Expand Down Expand Up @@ -47,7 +47,7 @@ NSArray *items =
detail:@"each button take one row if there are more than 2 items"
items:items]
showWithBlock:completeBlock];

//MMSheetView
NSArray *items =
@[MMItemMake(@"Normal", MMItemTypeNormal, block),
Expand All @@ -61,7 +61,7 @@ NSArray *items =
MMPopupView
===============
MMPopupView is a basic Pop-Up view designed to be subclassed.
MMPopupView is a basic Pop-Up view designed to be subclassed.
It provide 3 kind of animations(alert, sheet, drop), or you can provide your own animation by override the **showAnimation** and **hideAnimation**.
```objc
Expand All @@ -74,6 +74,7 @@ typedef NS_ENUM(NSUInteger, MMPopupType) {
@class MMPopupView;
typedef void(^MMPopupBlock)(MMPopupView *);
typedef void(^MMPopupCompletionBlock)(MMPopupView *, BOOL);
@interface MMPopupView : UIView
Expand All @@ -85,8 +86,8 @@ typedef void(^MMPopupBlock)(MMPopupView *);
@property (nonatomic, assign ) NSTimeInterval animationDuration; // default is 0.3 sec.
@property (nonatomic, assign ) BOOL withKeyboard; // default is NO. When YES, alert view with be shown with a center offset (only effect with MMPopupTypeAlert).
@property (nonatomic, copy ) MMPopupBlock showCompletionBlock; // show completion block.
@property (nonatomic, copy ) MMPopupBlock hideCompletionBlock; // hide completion block
@property (nonatomic, copy ) MMPopupCompletionBlock showCompletionBlock; // show completion block.
@property (nonatomic, copy ) MMPopupCompletionBlock hideCompletionBlock; // hide completion block
@property (nonatomic, copy ) MMPopupBlock showAnimation; // custom show animation block.
@property (nonatomic, copy ) MMPopupBlock hideAnimation; // custom hide animation block.
Expand Down Expand Up @@ -127,6 +128,11 @@ typedef void(^MMPopupBlock)(MMPopupView *);
- (void) hideWithBlock:(MMPopupBlock)block;
@end
/**
* hide all popupview with current class, eg. [MMAlertview hideAll];
*/
+ (void) hideAll;
```

If you want to create your own Pop-Up view,simply you only need to subclass from **MMPopupView**.
Expand Down Expand Up @@ -154,7 +160,7 @@ after you customize it, you can simply use it.
MMAlertView
===============
**MMAlertView** is based on **MMPopupView**.
**MMAlertView** is based on **MMPopupView**.
```objc
typedef void(^MMPopupInputHandler)(NSString *text);
Expand Down Expand Up @@ -211,7 +217,7 @@ typedef void(^MMPopupInputHandler)(NSString *text);
MMSheetView
===============
**MMSheetView** is based on **MMPopupView**.
**MMSheetView** is based on **MMPopupView**.
```objc
Expand Down Expand Up @@ -249,10 +255,11 @@ MMSheetView

@end
```
Changelog
===============
v1.6 Add '+ hideAll' method, improve code struct.
v1.5.3 Fixed touch problem with `touchWildToHide`
Expand All @@ -276,7 +283,7 @@ v1.2 Now you could know whether MMPopupView is visible by using:
v1.1 Now you can attached MMPopupView to any UIView you want by using:
```objc
@property (nonatomic, strong ) UIView *attachedView; // default is MMPopupWindow. You can attach MMPopupView to any UIView.
@property (nonatomic, strong ) UIView *attachedView; // default is MMPopupWindow. You can attach MMPopupView to any UIView.
```

v1.0 first version

0 comments on commit 4d8bd68

Please sign in to comment.