Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for iPad split view bug #173

Merged
merged 3 commits into from
May 14, 2020
Merged
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# _BulletinBoard_ Changelog

## Unreleased
### Fixes
- Fix for iPad split view bug
[#173] (https://github.com/alexaubry/BulletinBoard/pull/173)

## 🔖 v4.0.0
### Fixes
- Upgrade to Swift 5
Original file line number Diff line number Diff line change
@@ -42,7 +42,11 @@ class BulletinDismissAnimationController: NSObject, UIViewControllerAnimatedTran
snapshotActivityIndicator.rightAnchor.constraint(equalTo: snapshot.rightAnchor).isActive = true
snapshotActivityIndicator.bottomAnchor.constraint(equalTo: snapshot.bottomAnchor).isActive = true

snapshotActivityIndicator.style = .whiteLarge
if #available(iOS 13.0, *) {
snapshotActivityIndicator.style = UIActivityIndicatorView.Style.large
} else {
snapshotActivityIndicator.style = .whiteLarge
}
snapshotActivityIndicator.color = .black
snapshotActivityIndicator.isUserInteractionEnabled = false

Original file line number Diff line number Diff line change
@@ -31,6 +31,11 @@ class BulletinPresentationAnimationController: NSObject, UIViewControllerAnimate
return
}

// Fix the frame (Needed for iPad app running in split view)
if let fromFrame = transitionContext.viewController(forKey: .from)?.view.frame {
toVC.view.frame = fromFrame
}

let rootView = toVC.view!
let contentView = toVC.contentView
let backgroundView = toVC.backgroundView!
6 changes: 5 additions & 1 deletion Sources/Support/BulletinViewController.swift
Original file line number Diff line number Diff line change
@@ -165,7 +165,11 @@ extension BulletinViewController {
activityIndicator.topAnchor.constraint(equalTo: contentView.topAnchor).isActive = true
activityIndicator.bottomAnchor.constraint(equalTo: contentView.bottomAnchor).isActive = true

activityIndicator.style = .whiteLarge
if #available(iOS 13.0, *) {
activityIndicator.style = UIActivityIndicatorView.Style.large
} else {
activityIndicator.style = .whiteLarge
}
activityIndicator.color = .black
activityIndicator.isUserInteractionEnabled = false