Comments (4)
Hi @ed-mejia! 😄 Could you send me a working example replicating this issue so I can see whats going on?
from notificationbanner.
Hi @Daltron !!!,
I couldn't put together a sample (bit short of time), but I can explain what's the issue and how I did work around it.
calling banner.show(on: target)
will cause the banner view to be added as a subView of the target viewController, that's ok if you are dealing with UIViewControllers but if you have a UITableViewController or UICollectionViewController the view
will be a scrollView and the banner will scroll with it.
In my case I have a static registration form with a UITableViewController so as soon as the user scrolls to the bottom to finish up all the fields the banner is gone at the top of the scrollView.
I tried to "hack" the banner view to support this case but I couldn't find any clean solution with the short time I had, so what I did was to create a UIViewController called "container" and move my UITableViewController as a child controller of the container, after that when displaying the banner I do something like this:
let target = self is UITableViewController ? self.parent : self
banner.show(on: target)
This works pretty good, I don't know if the actual bannerView could handle internally this due to the nature of UITableViewControllers/UICollectionControllers views?
from notificationbanner.
@ed-mejia Thanks for the in depth explanation. I understand what is going on. What I what do if I were you would be create a custom UIView
object and put your table view inside that and then assign that custom view like so viewController.view = customView
.
from notificationbanner.
Going to close for now due to no activity.
from notificationbanner.
Related Issues (20)
- Banner style extension
- StatusBarNotificationBanner onTap not working
- Main Thread crash HOT 3
- iPhone Dynamic Island HOT 1
- NotificationBannerQueue needs to depend on a protocol (Liskov principle)
- SwiftUI HOT 4
- The position of the banner on the screen when changing orientation HOT 2
- Why disallow background color for custom views? HOT 1
- App crashes on nil bannerPosition when using `.applyStyling` HOT 1
- The banner has the wrong width when it is displayed on the primary view
- closure #2 in BaseNotificationBanner.dismiss(forced:) NSInternalInconsistencyException - Must have a keyboard layer tracked.
- could not find module 'NotificationBannerSwift' for target 'x86_64-apple-ios-simulator' HOT 1
- customize the height
- Issue regarding position When 2 Banner whowing same time HOT 1
- sideViewSize no longer available
- CarPlay blocks the NotificationBanner
- How can I add layer border? HOT 1
- Screen flicker on ios 17 HOT 4
- SnapKit dependency issues
- Request for updated iOS SDK version with the xcprivacy manifest HOT 7
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 notificationbanner.