Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaspard Viot committed Apr 29, 2014
2 parents 80a612b + 73d2c4c commit cbb7004
Show file tree
Hide file tree
Showing 10 changed files with 548 additions and 40 deletions.
4 changes: 2 additions & 2 deletions MaryPopin.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MaryPopin"
s.version = "1.2"
s.version = "1.3"
s.summary = "Category to display modal-like view controllers with more options"

s.description = <<-DESC
Expand All @@ -17,7 +17,7 @@ Pod::Spec.new do |s|

s.platform = :ios, '5.0'

s.source = { :git => "https://github.com/Backelite/MaryPopin.git", :tag => "1.2" }
s.source = { :git => "https://github.com/Backelite/MaryPopin.git", :tag => "1.3" }

s.source_files = 'MaryPopin/**/*.{h,m}'

Expand Down
89 changes: 88 additions & 1 deletion MaryPopin/UIViewController+MaryPopin.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ typedef NS_ENUM(NSInteger, BKTPopinTransitionStyle) {
* When the view controller is presented, its view has a undefined behavior.
*/
//UIDynamics transition styles
BKTPopinTransitionStyleSnap
BKTPopinTransitionStyleSnap,
/**
* When the view controller is presented, its view has a custom animation.
*/
BKTPopinTransitionStyleCustom
};

/**
Expand Down Expand Up @@ -95,12 +99,44 @@ typedef NS_OPTIONS(NSUInteger, BKTPopinOption) {
* Disable auto dismiss when touching outside of the popin view
*/
BKTPopinDisableAutoDismiss = 1 << 1,
/**
* Takes a screenshot of presenting view, blurs it and uses it as dimming view. Available only on ios 7.x.
*/
BKTPopinBlurryDimmingView = 1 << 2,
/**
* Set a background dimming view with a clear color. Default is a semi-transparent black background
*/
BKTPopinDimmingViewStyleNone = 1 << 16,
};

/**
* Options to quickly configure popin alignment in its container. Default is centered.
* @see -popinAlignement
* @since v1.3
*/
typedef NS_ENUM(NSInteger, BKTPopinAlignementOption) {
/**
* Popin will be centered in container
*/
BKTPopinAlignementOptionCentered = 0,
/**
* Popin will be stuck to top in container
*/
BKTPopinAlignementOptionUp = 1,
/**
* Popin will be left-aligned in container
*/
BKTPopinAlignementOptionLeft = 2,
/**
* Default will be stuck to bottom in container
*/
BKTPopinAlignementOptionDown = 3,
/**
* Popin will be right-aligned in container
*/
BKTPopinAlignementOptionRight = 4
};

/**
* `MaryPopin` is a category allowing modal-like presentation of view controllers but with more configuration options.
* Configuration options include popin size, transition style, transition direction, response to keyboard notifications and auto dismiss.
Expand Down Expand Up @@ -245,4 +281,55 @@ typedef NS_OPTIONS(NSUInteger, BKTPopinOption) {
*/
- (void)setPopinOptions:(BKTPopinOption)popinOptions;


/**
* Get the custom in animation block. Default value is nil.
*
* @return The In animation block.
* @see -setPopinCustomInAnimation:
* @since v1.3
*/
- (void (^)(UIViewController * popinController,CGRect initialFrame,CGRect finalFrame))popinCustomInAnimation;

/**
* The popinCustomAnimation let you pass an custom in animation. The popInController frame must be the finalFrame in the end of the animation.
*
* @param customInAnimation The Block with animation.
* @since v1.3
*/
- (void)setPopinCustomInAnimation:(void (^)(UIViewController * popinController,CGRect initialFrame,CGRect finalFrame))customInAnimation;

/**
* Get the custom out animation block. Default value is nil.
*
* @return The Out animation block.
* @see -setPopinCustomOutAnimation:
* @since v1.3
*/
- (void (^)(UIViewController * popinController,CGRect initialFrame,CGRect finalFrame))popinCustomOutAnimation;

/**
* The popinCustomOutAnimation let's you pass an custom out animation. The popInController frame must be the finalFrame in the end of the animation.
*
* @param customOutAnimation The Block with animation.
* @since v1.3
*/
- (void)setPopinCustomOutAnimation:(void (^)(UIViewController * popinController,CGRect initialFrame,CGRect finalFrame))customOutAnimation;

/**
* The options to apply to the popin. Default value is `BKTPopinAlignementOptionCentered`.
*
* @return The BKTPopinAlignementOption values as a bit field.
* @see -setPopinAlignement:
* @since v1.3
*/
- (BKTPopinAlignementOption)popinAlignment;

/**
* The options to apply to the popin. For a list of possible options, see BKTPopinAlignementOption
*
* @param popinAlignement The BKTPopinAlignementOption values separated by | character.
* @since v1.3
*/
- (void)setPopinAlignment:(BKTPopinAlignementOption)popinAlignment;
@end

0 comments on commit cbb7004

Please sign in to comment.