Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Move web service call to <code>viewWillAppear</code> or <code>viewDidAppear</code>, so call will initiate after controller view appears on screen. </p> <p>Ideally you should perform the web service call in the background i.e. not on the main thread. Use <a href="https://developer.apple.com/library/ios/DOCUMENTATION/Cocoa/Reference/NSOperation_class/Reference/Reference.html#//apple_ref/doc/uid/TP40004591" rel="nofollow"><code>NSOperation</code></a> and <a href="https://developer.apple.com/library/ios/DOCUMENTATION/Cocoa/Reference/NSOperationQueue_class/Reference/Reference.html" rel="nofollow"><code>NSOperationQueue</code></a> or <a href="https://github.com/AFNetworking/AFNetworking" rel="nofollow"><code>AFNetworking</code></a> or <a href="https://developer.apple.com/library/ios/documentation/Performance/Reference/GCD_libdispatch_Ref/Reference/reference.html" rel="nofollow">Grand Central Dispatch</a>. You can then initiate the call in <code>viewDidLoad</code> itself.</p> <p>Here are a few links that can get you started.</p> <ol> <li><a href="http://www.raywenderlich.com/19788/how-to-use-nsoperations-and-nsoperationqueues" rel="nofollow">How To Use NSOperations and NSOperationQueues</a></li> <li><a href="http://mobile.tutsplus.com/tutorials/iphone/ios-sdk_afnetworking/" rel="nofollow">Networking Made Easy With AFNetworking</a></li> <li><a href="http://mobile.tutsplus.com/tutorials/iphone/ios-quick-tip-interacting-with-web-services/" rel="nofollow">iOS Quick Tip: Interacting with Web Services</a> - for using GCD</li> </ol> <p>Hope that helps!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload