Comments (13)
I have done a similar implementation myself for my company and my recommendation is to create a separate UIWindow
for the alerts. It then makes rotation and queing very simple. With this implementation you will have problems to display alerts on top of popovers / modal controllers.
from sdcalertview.
I'm interested to see how that works. My current work in progress (7e6b9fb) uses the same UIWindow
for multiple alerts, just like UIAlertView
does. The problem right now is that auto-layout doesn't move a previously shown alert until after the re-appearing animations have finished (which makes it jump). When presenting a brand new alert, this doesn't happen because auto-layout happens earlier. So multiple UIWindow
s would solve that problem, but since I'm pretty close figuring it out with just one window, I want to put some more effort in that first.
from sdcalertview.
0ded56b fixes this issue.
from sdcalertview.
Sorry for bringing this up from 4 years ago - but is this implemented in the new UIAlertController
-like API?
from sdcalertview.
Unfortunately it is not 😕
from sdcalertview.
Thanks. Is the way to do it is via multiple UIWindow
s?
from sdcalertview.
No the current way to do it is to present the next alert from the previous one, which might work for you but is far from ideal.
from sdcalertview.
Why not with different UIWindows?
from sdcalertview.
Sure that could work as well, but is probably more work as you have to manage all these windows somehow.
from sdcalertview.
Displaying the next alert from the previous one is also not very straight-forward - you'd need a queue for the next alerts, something that drains it when the presentation is done (if you'll present while a presentation is not complete you'll get an error).
from sdcalertview.
Yep for sure. Depends a bit on the use-case: if you want to be able to show to alerts right after each other I wouldn't start juggling windows, but if you have N alerts that could show at any given point you might have to write some abstractions to make it nice.
Ideally this is just part of the library but I ran into some tricky stuff and was never able to solve all problems/edge cases. Since nobody really seemed to care too much about the lack of this functionality I eventually stopped pursuing it.
from sdcalertview.
It would be very nice to have as part of the library :)
My use-case is that I want to display alerts one after the other, without the user accepting any alert (meaning just blasting a bunch of alerts to the screen that the user then needs to handle/dismiss one at a time).
The thing is, is I get a notification from the system (open URL) and need to show an alert. Then after a very short while I get another one, while the first alert is still in the presentation process (but not yet presented). And then, I'm in a problem - How can I queue the 2nd alert to present immediately after the first one completed presenting?
from sdcalertview.
Yeah it’s a tough case that’s unfortunately unsupported and pretty hard to get right so I’m afraid I don’t have a good answer at the moment.
from sdcalertview.
Related Issues (20)
- Convert to Swift 5 HOT 1
- SPM support HOT 7
- [Question] Exclude view from being dimmed HOT 1
- Error with Catalyst HOT 2
- AttributedTitle of AlertAction does not apply (Color, font, etc...) with ActionSheet
- Example app crash on iPad presenting UIAlertController
- Readme.md images cannot be loaded
- Evaluate support to popover ActionSheet on iPad HOT 3
- ActionSheet custom view vertical alignment
- Open components to inheritance outside SDCAlertView module HOT 4
- Rounded corners are circles instead of squircles
- Different look for dark theme in ios 13 and ios 12 HOT 6
- AlertController with preferredStyle of .actionSheet Does Not Correctly Display attributedTitle or attributedMessage
- Crash on iOS 15 HOT 2
- How to perform height animation on contentView correctly? HOT 1
- Warning when showing AlertView with textfield
- override var supportedInterfaceOrientations: UIInterfaceOrientationMask HOT 1
- Crash on tintColorDidChange HOT 1
- Privacy manifest required by Apple HOT 1
- Privacy Manifest HOT 3
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 sdcalertview.