Note that there are some explanatory texts on larger screens.

plurals
  1. POMultiple Asynchronous HTTP Requests in Background iPhone
    primarykey
    data
    text
    <p>I have an application that has many views (Using tab bar controller). I want to make concurrent asynchronous http requests, independently of the current view that the user is viewing. When an http request is responded , I want to update the User Interface, and then request again. If I write the code inside a UIViewController Subclass, everything works fine. Where can I write my code so as to work , without knowing which tab the user is viewing? I would like to avoid using threads. Is that possible?</p> <p>I have made a webservice that takes http requests and responds when it has something new. So, then i request for the new information and then i reopen the window for the webservice to talk me. That way I make a "persistent" connection. </p> <p>Finally i would like to know, what is the best way to inform my model for the changes that will be made to it. NSNotification? Delegation? </p> <p><strong>UPDATE</strong></p> <p>The code below DOES NOT receive any response. It receives BAD_ACCESS and it crashes.</p> <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. // Request Data ConnectionHandler *connectionHandler = [[ConnectionHandler alloc] init]; [connectionHandler requestSO]; [connectionHandler requestSopen]; // Make Root View Controller MainViewController *mainViewcontroller = [[MainViewController alloc] initWithNibName:@"MainViewController" bundle:nil]; [self.window setRootViewController:mainViewcontroller]; // self.window.backgroundColor = [UIColor whiteColor]; [self.window makeKeyAndVisible]; return YES; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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