终止异步调用

时间:2017-03-16 05:50:56

标签: ios objective-c multithreading

我有以下代码,其中 <section id="form"> <div class="container"> <form id="contact_form" method="post" class="form" onsubmit="return confirm('Successfully submitted!');"> <div class="contact-form"> <div class="row"> <div class="col-md-6 col-sm-6 form-group "> <input class="form-control" id="name" name="name" placeholder="Full name " type="text" required> </div> <div class="col-md-6 col-sm-6 form-group "> <input class="form-control" id="email" name="email" placeholder="Email" type="text" required> </div> </div> <div class="row"> <div class="col-md-6 col-sm-6 form-group "> <input class="form-control" id="city" name="city" placeholder="City" type="text" required> </div> <div class="col-md-6 col-sm-6 form-group"> <input class="form-control" id="province" name="province" placeholder="Province" type="text" required> </div> </div> <div class="row"> <div class="col-md-12"> <textarea class ="form-control" placeholder ="ISBNs with book conditions. One ISBN per line." id="message" name="message" required></textarea> </div> </div> <div class="row mt20"> <div class="col-md-12 form-group"> <button id="submit_btn" name="submit_btn" type="submit" value="submit_btn" class="btn btn-outline btn-primary btn-icon pull-right btn-lg btn-rounded">Submit <span class="fa fa-chevron-right icon-with-btn"></span> </button> </div> </div> </form> </div> // this div should be before </form> </div> </section> 操作执行。以下代码有效,但我的问题是如何取消/终止async操作?

换句话说,当应用通过调用async在后​​台工作,然后用户导航到其他视图时,我应该终止此[self addAllImages]来电。

async

0 个答案:

没有答案