codestergit / SweetAlert-iOS

Live animated Alert View for iOS written in Swift
MIT License
2.05k stars 303 forks source link

how can i send to another viewcontroller after tap OK button? #19

Open davut5 opened 9 years ago

davut5 commented 9 years ago

self.dismissViewControllerAnimated(true, completion: nil) working but self.presentViewController(sampleviewcontroller(), animated:true, completion:nil) not working

varkrishna commented 6 years ago

@davut5 you can do something like _ = SweetAlert().showAlert("Are you sure?", subTitle: "You are navigating to other screen", style:
AlertStyle.warning, buttonTitle:"OK", buttonColor:UIColor.colorFromRGB(0xD0D0D0) , otherButtonTitle: "" ,otherButtonColor: UIColor.colorFromRGB(0xDD6B55), EnabledOutsideTap:
true) { (isOtherButton) -> Void in

            **// Code to navigate**

 `}`