{"action":"created","issue":{"url":"https://api.github.com/repos/dogo/SCLAlertView/issues/197","repository_url":"https://api.github.com/repos/dogo/SCLAlertView","labels_url":"https://api.github.com/repos/dogo/SCLAlertView/issues/197/labels{/name}","comments_url":"https://api.github.com/repos/dogo/SCLAlertView/issues/197/comments","events_url":"https://api.github.com/repos/dogo/SCLAlertView/issues/197/events","html_url":"https://github.com/dogo/SCLAlertView/issues/197","id":141841385,"number":197,"title":"Execute block while 'showWaiting' running","user":{"login":"invisible66","id":8086679,"avatar_url":"https://avatars.githubusercontent.com/u/8086679?v=3","gravatar_id":"","url":"https://api.github.com/users/invisible66","html_url":"https://github.com/invisible66","followers_url":"https://api.github.com/users/invisible66/followers","following_url":"https://api.github.com/users/invisible66/following{/other_user}","gists_url":"https://api.github.com/users/invisible66/gists{/gist_id}","starred_url":"https://api.github.com/users/invisible66/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/invisible66/subscriptions","organizations_url":"https://api.github.com/users/invisible66/orgs","repos_url":"https://api.github.com/users/invisible66/repos","events_url":"https://api.github.com/users/invisible66/events{/privacy}","received_events_url":"https://api.github.com/users/invisible66/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-18T11:30:39Z","updated_at":"2016-05-16T17:30:01Z","closed_at":null,"body":"I have a confirmation alert. when user press the 'Confirm' button i execute a block, hide this alert and call another method. Then showing waiting alert. i want to execute a block when waiting alert is shown. how can i do that?\r\n\r\nEdit : \r\n\r\ni wrote this code. it's working but i didn't like that.. There is another way?\r\n\r\n      -(void)sendForm{\r\n\r\n         SCLAlertViewBuilder *builder = [[SCLAlertViewBuilder alloc] initWithNewWindow]\r\n         .addButtonWithActionBlock(@\"Yes\", ^{\r\n             [self sendData];\r\n         });\r\n\r\n         SCLAlertViewShowBuilder *showBuilder = [SCLAlertViewShowBuilder new]\r\n         .style(Warning)\r\n         .title(@\"User Informations\")\r\n         .subTitle(@\"Informations will be updated. Continue?\")\r\n         .closeButtonTitle(@\"No\")\r\n         .duration(0);\r\n         [showBuilder showAlertView:builder.alertView onViewController:self];\r\n     }\r\n\r\n     -(void) sendData{\r\n        SCLAlertView *alertXx = [[SCLAlertView alloc] init];\r\n         [alertXx showWaiting:self title:LutfenBekle subTitle:@\"Updating Informations..\" closeButtonTitle:nil duration:0.0f];\r\n         dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{\r\n            // accessing the server..\r\n             dispatch_async(dispatch_get_main_queue(), ^{\r\n                 [alertXx hideView];\r\n             });\r\n         });\r\n     }"},"comment":{"url":"https://api.github.com/repos/dogo/SCLAlertView/issues/comments/219489146","html_url":"https://github.com/dogo/SCLAlertView/issues/197#issuecomment-219489146","issue_url":"https://api.github.com/repos/dogo/SCLAlertView/issues/197","id":219489146,"user":{"login":"LeandroHub","id":5721902,"avatar_url":"https://avatars.githubusercontent.com/u/5721902?v=3","gravatar_id":"","url":"https://api.github.com/users/LeandroHub","html_url":"https://github.com/LeandroHub","followers_url":"https://api.github.com/users/LeandroHub/followers","following_url":"https://api.github.com/users/LeandroHub/following{/other_user}","gists_url":"https://api.github.com/users/LeandroHub/gists{/gist_id}","starred_url":"https://api.github.com/users/LeandroHub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeandroHub/subscriptions","organizations_url":"https://api.github.com/users/LeandroHub/orgs","repos_url":"https://api.github.com/users/LeandroHub/repos","events_url":"https://api.github.com/users/LeandroHub/events{/privacy}","received_events_url":"https://api.github.com/users/LeandroHub/received_events","type":"User","site_admin":false},"created_at":"2016-05-16T17:30:01Z","updated_at":"2016-05-16T17:30:01Z","body":"I think it's a good approach! \r\n\r\nAnyway, I should set:\r\n\r\n```__weak typeof(SCLAlertView) *weakAlert = alertXx;```\r\n\r\nand use it inside the second dispatch_async like this:\r\n\r\n```[weakAlert hideView];```"}}