Comments (8)
@hengchengfei,
Could you please explain more detail to me?
Thanks.
from toaster.
我的意思是,
连续点击弹出按钮,也就是连续调用JLToast.makeText()。
比如非常快的点击10次,会连续出来10个信息窗口。
而我希望在前一个弹出窗口还没消失的时候,不能再弹出窗口了。
但是我没发判断前一个窗口有没消失。
from toaster.
repeat click the button,for example 10 times,then Toast view 10 times。
i want to show the next toast after the previous toast hide。
from toaster.
Do you want 'hide previous toast and show new toast'?
from toaster.
Yes
from toaster.
That's not officially supported right now. (I'll make it as soon as possible)
However you can do with this:
previousToast.finish()
previousToast.view.removeFromSuperview()
// then show new toast
from toaster.
here is some code that might help. It doesn't work in every situation but it might help you develop something fully functional:
`
var toasts = JLToast
func removeTheToast(toast: JLToast){
for theToast in self.toasts{
if theToast != toast {
theToast.finish()
theToast.view.removeFromSuperview()
}
}
}`
func showToast(string: String){
let toast = JLToast.makeText(string.localized, duration: JLToastDelay.ShortDelay)
toast.show()
toasts.append(toast)
removeTheToast(toast)
}
from toaster.
Hey guys, thanks for waiting. #74 might help.
from toaster.
Related Issues (20)
- Message on show() HOT 2
- iOS13 上会导致状态栏的点击失效,直接的影响就是导致全局单击状态栏(tableView/collectionView)返回顶部失效 HOT 8
- IOS 13 , Toast not showing HOT 1
- Please update pod version HOT 6
- Warnings when building the project
- Question: multiple appearance
- Set different font family of toast message HOT 1
- Cannot build on Xcode 12 HOT 3
- please add tag 2.3.0 HOT 14
- Switchcase must be Exhaustive HOT 3
- Add support for SPM HOT 1
- Switch must be exhaustive | Version 12.0.1 (12A7300) HOT 2
- Error when using "Picture in Picture".
- Toast not rotating with device orientation HOT 2
- mistake
- On iOS 15, when the keyboard is displaying, toasts don't display until I hide and display the keyboard again. HOT 1
- Xcode 13.3.1: no Package.swift manifest for version 2.3.0 HOT 5
- iOS 16 beta 2 - landscape mode wrong orientation HOT 6
- The app interface will be forced to change when the device is horizontal.
- Could not find module 'Toaster' for target 'x86_64-apple-ios-simulator'
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 toaster.