Git Product home page Git Product logo

Comments (11)

LowKostKustomz avatar LowKostKustomz commented on May 18, 2024 1

You are welcome!

from statusalert.

LowKostKustomz avatar LowKostKustomz commented on May 18, 2024

Hi, could you please provide me code that presents alert and what are you doing?

from statusalert.

LowKostKustomz avatar LowKostKustomz commented on May 18, 2024

And all the code related to StatusAlert, setup, timings, and all the things that could help me identify the bug.

from statusalert.

RSickenberg avatar RSickenberg commented on May 18, 2024
let likeAlert = StatusAlert()

... 

noFavorites.image = #imageLiteral(resourceName: "DislikeFullHighRes")
noFavorites.title = "Oh!"
noFavorites.message = "It seems you don't have any favorties. Go love your favorites on the ❤️ top right corner."
noFavorites.canBePickedOrDismissed = true
noFavorites.appearance = .copyCommon()
noFavorites.alertShowingDuration = TimeInterval(exactly: 5)!

from statusalert.

LowKostKustomz avatar LowKostKustomz commented on May 18, 2024

I think I get your problem: you are calling show method multiple times on one instance of StatusAlert, am I right?

If so then there is the rule for now: you should create new instance of alert for every new alert you want to present. I will fix this in a few days and distribute the fix, so stay tuned.

If this is not your problem then reply with some additional info.

from statusalert.

RSickenberg avatar RSickenberg commented on May 18, 2024

You are right, Thanks for the fix, I update to the new version when she is ready :)

Thanks for taking time with me ! 😄

from statusalert.

LowKostKustomz avatar LowKostKustomz commented on May 18, 2024

The issue was fixed in version 0.12.1.

Now you can present the same instance of alert multiple times.

NOTE

  • more than one presentation of one instance of alert at the same time is not allowed and will be ignored;

from statusalert.

RSickenberg avatar RSickenberg commented on May 18, 2024

Thanks @LowKostKustomz !

from statusalert.

RSickenberg avatar RSickenberg commented on May 18, 2024

Hello @LowKostKustomz, thanks for your upgrade, but I have a new bug, when I keep init my view and I switch from a new tab and recall the Alert, I cannot dismiss it anymore, is it from my side?

from statusalert.

LowKostKustomz avatar LowKostKustomz commented on May 18, 2024

It depends on your code, could you please provide more detailed description of your bug what you are doing and show me the code that probably can cause the issue?

Also you can try to go to source files of my library and set a breakpoint to dismiss method and see if it is called. Try to debug it from the inside of my library and step by step getting up to your code, maybe some of your methods is not called.

from statusalert.

RSickenberg avatar RSickenberg commented on May 18, 2024

I begin my ViewController with an instantiation of StatusAlert
let likeAlert = StatusAlert()

I call a method onViewDidLoad with those lines

StatusAlert.multiplePresentationsBehavior = .dismissCurrentlyPresented
methodName()

func methodName() {
    likeAlert.canBePickedOrDismissed = true
    likeAlert.alertShowingDuration = TimeInterval(exactly: 2)!
}

And that's it when I recall my StatusAlert if I didn't deinit (back to root) the status alert doesn't dismiss itself

from statusalert.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.