{"action":"closed","issue":{"url":"https://api.github.com/repos/vikmeup/SCLAlertView-Swift/issues/117","repository_url":"https://api.github.com/repos/vikmeup/SCLAlertView-Swift","labels_url":"https://api.github.com/repos/vikmeup/SCLAlertView-Swift/issues/117/labels{/name}","comments_url":"https://api.github.com/repos/vikmeup/SCLAlertView-Swift/issues/117/comments","events_url":"https://api.github.com/repos/vikmeup/SCLAlertView-Swift/issues/117/events","html_url":"https://github.com/vikmeup/SCLAlertView-Swift/issues/117","id":123481138,"number":117,"title":"Feature request","user":{"login":"ravigill","id":1488544,"avatar_url":"https://avatars.githubusercontent.com/u/1488544?v=3","gravatar_id":"","url":"https://api.github.com/users/ravigill","html_url":"https://github.com/ravigill","followers_url":"https://api.github.com/users/ravigill/followers","following_url":"https://api.github.com/users/ravigill/following{/other_user}","gists_url":"https://api.github.com/users/ravigill/gists{/gist_id}","starred_url":"https://api.github.com/users/ravigill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ravigill/subscriptions","organizations_url":"https://api.github.com/users/ravigill/orgs","repos_url":"https://api.github.com/users/ravigill/repos","events_url":"https://api.github.com/users/ravigill/events{/privacy}","received_events_url":"https://api.github.com/users/ravigill/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-22T13:25:13Z","updated_at":"2016-03-12T07:30:13Z","closed_at":"2016-03-12T07:30:13Z","body":"It would be great if the following feature could be added. I have created a extension to achieve this.\r\n\r\n<b>prepare the alert without showing it right-away and only show it by explicitly calling show() somewhere else</b>.\r\n\r\nUsecase scenario 1\r\n  1. Users sees a screen with table\r\n  2. User clicks on a table cell & <b>the Alert is prepared</b>\r\n  3. User is taken to a new screen (another View controller)\r\n  4. Users goes back to the original screen with table\r\n  5. User is presented with the <b>previously prepared Alert</b>\r\n\r\nMock example\r\n```swift\r\nclass MyViewController: UIViewController {\r\n    private var alertViewResponder: SCLAlertViewResponder?\r\n    ...\r\n    func userClickedSomewhere(){\r\n          ...\r\n          self.alertViewResponder = SCLAlertView().prepareTitle(\r\n                \"Congratulations\", // Title of view\r\n                subTitle: \"Operation successfully completed.\", // String of view\r\n                duration: 2.0, // Duration to show before closing automatically, default: 0.0\r\n                completeText: \"Done\", // Optional button value, default: \"\"\r\n                style: .Success, // Styles - see below.\r\n                colorStyle: 0xA429FF,\r\n                colorTextButton: 0xFFFFFF\r\n            )\r\n    }\r\n    ...\r\n    func showAlert(){\r\n        self.alertViewResponder!.show()\r\n    }\r\n}\r\n```"}}