Skip to content

Commit

Permalink
Merge pull request #123 from Orderella/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
mwfire committed Mar 15, 2017
2 parents ace517a + 4015f15 commit 047a703
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Changelog

* **0.5.4** Fixed bug where blur view would reveal hidden layer<br>Improved view controller lifecycle handling<br>Scroll views can now be used with gesture dismissal
* **0.5.3** Fixed memory leak with custom view controllers<br>Added UI automation & snapshot tests
* **0.5.2** Fixed image scaling for default view
* **0.5.1** Introduced custom button height parameter<br>Reintroduced iOS8 compatibility
Expand Down
2 changes: 1 addition & 1 deletion PopupDialog.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'PopupDialog'
s.version = '0.5.3'
s.version = '0.5.4'
s.summary = 'A simple custom popup dialog view controller'
s.homepage = 'https://github.com/orderella/PopupDialog'
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
4 changes: 3 additions & 1 deletion PopupDialog/Classes/FXBlurView.m
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,9 @@ - (UIImage *)snapshotOfUnderlyingView
- (NSArray *)hideEmptyLayers:(CALayer *)layer
{
NSMutableArray *layers = [NSMutableArray array];
if (CGRectIsEmpty(layer.bounds))

// See https://github.com/nicklockwood/FXBlurView/issues/126
if (CGRectIsEmpty(layer.bounds) && !layer.hidden)
{
layer.hidden = YES;
[layers addObject:layer];
Expand Down
5 changes: 5 additions & 0 deletions PopupDialog/Classes/PopupDialog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,15 @@ final public class PopupDialog: UIViewController {
// Add our custom view to the container
if #available(iOS 9.0, *) {
if let stackView = popupContainerView.stackView as? UIStackView {
addChildViewController(viewController)
stackView.insertArrangedSubview(viewController.view, at: 0)
viewController.didMove(toParentViewController: self)
}
} else {
if let stackView = popupContainerView.stackView as? TZStackView {
addChildViewController(viewController)
stackView.insertArrangedSubview(viewController.view, at: 0)
viewController.didMove(toParentViewController: self)
}
}

Expand All @@ -158,6 +162,7 @@ final public class PopupDialog: UIViewController {
let panRecognizer = UIPanGestureRecognizer(target: interactor, action: #selector(InteractiveTransition.handlePan))
popupContainerView.stackView.addGestureRecognizer(panRecognizer)
let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(handleTap))
tapRecognizer.cancelsTouchesInView = false
popupContainerView.addGestureRecognizer(tapRecognizer)
}
}
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ Minimum requirement is iOS 8.0. This dialog was written with Swift 3, for 2.2 co
# Changelog
* **0.5.4** Fixed bug where blur view would reveal hidden layer<br>Improved view controller lifecycle handling<br>Scroll views can now be used with gesture dismissal
* **0.5.3** Fixed memory leak with custom view controllers<br>Added UI automation & snapshot tests
* **0.5.2** Fixed image scaling for default view
* **0.5.1** Introduced custom button height parameter<br>Reintroduced iOS8 compatibility
Expand Down

0 comments on commit 047a703

Please sign in to comment.