Skip to content
This repository was archived by the owner on Apr 27, 2019. It is now read-only.

Commit 033ab23

Browse files
author
Carson Perrotti
committed
Small bug fix and version bump
1 parent 7417ca6 commit 033ab23

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

CNPPopupController.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
1616
#
1717

1818
s.name = "CNPPopupController"
19-
s.version = "0.2.0"
19+
s.version = "0.2.1"
2020
s.summary = "A versatile popup for iOS"
2121

2222
s.description = <<-DESC
@@ -77,7 +77,7 @@ Pod::Spec.new do |s|
7777
# Supports git, hg, bzr, svn and HTTP.
7878
#
7979

80-
s.source = { :git => "https://github.com/carsonperrotti/CNPPopupController.git", :tag => "0.2.0" }
80+
s.source = { :git => "https://github.com/carsonperrotti/CNPPopupController.git", :tag => "0.2.1" }
8181

8282

8383
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #

CNPPopupController/CNPPopupController.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ @interface CNPPopupController () <UIGestureRecognizerDelegate>
2323
@property (nonatomic, strong) UITapGestureRecognizer *backgroundTapRecognizer;
2424
@property (nonatomic, strong) UIView *popupView;
2525
@property (nonatomic, strong) NSArray *views;
26+
@property (nonatomic) BOOL dismissAnimated;
2627

2728
@end
2829

@@ -242,6 +243,9 @@ - (void)presentPopupControllerAnimated:(BOOL)flag {
242243
[self.delegate popupControllerWillPresent:self];
243244
}
244245

246+
// Keep a record of if the popup was presented with animation
247+
self.dismissAnimated = flag;
248+
245249
[self applyTheme];
246250
[self calculateContentSizeThatFits:CGSizeMake([self popupWidth], self.maskView.bounds.size.height) andUpdateLayout:YES];
247251
self.popupView.center = [self originPoint];
@@ -350,6 +354,7 @@ - (CGFloat)popupWidth {
350354
- (void)handleBackgroundTapGesture:(id)sender {
351355
if (self.theme.shouldDismissOnBackgroundTouch) {
352356
[self.popupView endEditing:YES];
357+
[self dismissPopupControllerAnimated:self.dismissAnimated];
353358
}
354359
}
355360

CNPPopupControllerExample/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>0.2</string>
18+
<string>0.2.1</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
22-
<string>517</string>
22+
<string>519</string>
2323
<key>LSRequiresIPhoneOS</key>
2424
<true/>
2525
<key>UILaunchStoryboardName</key>

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
#CNPPopupController
22

3-
##What's new
4-
** Updated: June 14th, 2015 v0.2.0 **
3+
##Version History
4+
**June 24th, 2015 v0.2.1**
5+
- Bug fix for dismissing on background mask touch.
6+
7+
**June 14th, 2015 v0.2.0**
58
- Completely rewritten. *Started from the bottom, now we're here.*
69
- Ther are some minor API changes in v0.2.0. I tried to keep it as close to the last version as possible. See the example project if you need some help getting it set up.
710
- Custom view support (You can add anything, as it's contents as long as it is a UIView or subclass of UIView

0 commit comments

Comments
 (0)