21 Jun 2013, 20:11
Generic-user-small

Allan Z (3 posts)

Currently, the following set of code:

tweetVC.completionHandler = ^(SLComposeViewControllerResult result) {
            if (result == SLComposeViewControllerResultDone) {
                [self dismissViewControllerAnimated:YES completion:NULL];
                [self reloadTweets];  
            }
        };

Is causing a relatively minor but annoying issue that if the user hits “I finished the project”, taken to the compose Tweet view, and then hit “Cancel”, it will take two tabs on the Cancel button to get back to the previous view.

Additionally, I am unsure why [self presentViewController:tweetVC animated:YES completion:NULL]; comes after the block bit with the completion handler. I have tried putting this code before the handler, and it works just fine. In terms of flow, wouldn’t it make sense to show the tweet compose view first, and then add in the bit about handling what happens when the user hits “done”?

Thanks!

21 Jun 2013, 22:15
Generic-user-small

Allan Z (3 posts)

I figured out how to get the “cancel” button to behave.. and it the solution is quite easy, simply add:

if (result == SLComposeViewControllerResultCancelled) {
                [self dismissViewControllerAnimated:YES completion:NULL];
            }

inside the block and you should be good to go.

  You must be logged in to comment