Skip to content

buttons from previous alertViews being displayed  #167

Closed
@Jackson0111

Description

@Jackson0111

Every time I call setupAlert() which sets up an alert view, buttons/textfield from previous alertViews will be added again and displayed. Here is the function:

let alert = SCLAlertView()

func setupAlert() {

    alert.backgroundType = SCLAlertViewBackground.Blur

    alert.showAnimationType = SCLAlertViewShowAnimation.SlideInFromTop

    alert.hideAnimationType = SCLAlertViewHideAnimation.SlideOutToBottom

    alert.showInfo(self, title: "Notice", subTitle: "Share this app!", closeButtonTitle: "OK", duration: 0.0)

}

func test() {

      setupAlert() // if gets called 3 times, will have 3 ok buttons 
}

if I display this alert n times, there will be n "OK" buttons. Is there a way to fix this? But other than this, im loving this library, great work and I appreciate it!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions