Comments (5)
I've had a chance to run a few tests with this fix and it seems to have the desired effect: the showBulletin(above:animated:completion:)
method does now place the blur over the specified viewController's view.
Thank you.
from bulletinboard.
Hi. I ran into this issue as well. It happens when using showBulletin(above:animated:completion:)
and the presenting ViewController is smaller than the window. (For example, if it is being presented modally as a page sheet which, starting in iOS 13, uses card-like look rather than full-screen.)
Looks like it has to do with this fix ( #173 ) in 4.1.1. that fixed an issue with iPad presentations when using split-screen multitasking ( #172 ). The added line in BulletinPresentationAnimationController.swift is:
// Fix the frame (Needed for iPad app running in split view) if let fromFrame = transitionContext.viewController(forKey: .from)?.view.frame { toVC.view.frame = fromFrame }
The problem, best as I can tell, is that we're getting a frame that is in the coordinate system of the ViewController we are presenting "above" (which will always be located at (0,0)), and then applying that frame in the coordinate system of the transitionContext's containerView, which, it seems, is the size of the full window. So if the presentingVC is a modally presented page sheet and its height is less than the window, the blurred background will start at the top and not reach the bottom, leaving the "exposed" area at the bottom of the screen as you describe.
A couple of solutions:
- The easiest is to switch from using the
showBulletin(above:animated:completion:)
method of BLTNItemManager to theshowBulletin(in:animated:completion:)
method, which, according to the docs: "Presents the bulletin on top of your application window." In my case, this was more or less what I really wanted, anyway. - I did experiment and found that by modifying the lines above in BulletinPresentationAnimationController.swift, I could bring about the desired behavior by using UIView's
convert(_ rect: CGRect, to view: UIView?) -> CGRect
to convert the "fromFrame" into the right coordinate system before applying it to the toVC.view. If there is sufficient interest I could work up a pull request with that modification. It worked well in my tests, but I don't know if there would be any unwanted side effects.
from bulletinboard.
Hey @gesabo & @kenzinn I am responsible for that PR which probably introduced this issue. I have witnessed this issue couple times myself also and my solution was also to just use the showBulletin(in:animated:completion)
-version. I am not speaking on behalf of the people maintaining this library but I think that you could just fire away a PR if you think it will solve the issue. Then we will know.
from bulletinboard.
Hey @Piidro, thank you for the PR which fixed the iPad split screen issue.
I've created a PR (#183) to fix this one. If it's not found useful, no worries. Thank you all.
from bulletinboard.
This should be fixed in the upcoming release, could you please confirm it? #189
from bulletinboard.
Related Issues (20)
- UIKitCore con < iOS 11 HOT 2
- Xcode 12 - Double-quoted include in framework header, expecting angle-bracketed instead HOT 1
- iPad: do not show centered on the screen but on the bottom
- Add an option for manually setting dark mode on/off HOT 1
- Swift Compiler Warning: Cannot match several associated values at once HOT 3
- Crash on BulletinCloseButton HOT 1
- Crash when dismissing bulletin board HOT 2
- Swift: Buttons not working HOT 9
- Landscape mode HOT 1
- Add dismissHandler to BLTNItemManager
- Adjust tableView height when keyboard appears HOT 2
- SwiftUI life cycle example
- How to add textfield ? HOT 3
- Documentation & Youtube Video Links Broken. HOT 1
- SwiftUi support
- Could not find module 'BLTNBoard' for target 'x86_64-apple-ios-simulator'; found: arm64, arm64-apple-ios-simulator, at: .../Build/Products/Debug-iphonesimulator/BLTNBoard.swiftmodule HOT 1
- Wrong title will be used after set alternativeButtonTitle
- Background color for alternativeButton? HOT 1
- Corner Radius for BLTNPageItem.image
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bulletinboard.