Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    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. VO
      singulars
      1. This table or related slice is empty.
    1. COWow, that fixed the problem. Thanks so much! That was so simple! I'm still not entirely sure why though. I will have to read up on it. Now that I've got a fully implemented and working NSUrlConnection method (which on it's own is asynchronous) and a NSData/dataWithContentsOfURL method using NSObjectQueue for asynchronicity method which works, which one do you recommend I use? What are the strengths of using NSUrlConnection vs. NSData and vice versa? I have heard that NSUrlConnection has more flexibility with regards to caching and handles errors better. Is that true? Thanks again!
      singulars
    2. COIt's true that NSURLConnection gives you more flexibility. But using the NSURLConnection's asynchronous loading in a background NSOperation is quite tricky, because you'll need to set up your own run loop. You can use `-[NSURLConnection sendSynchronousRequest:returningResponse:error:]` method to get some of the flexibility offered by NSURLConnection (see NSMutableURLRequest) while keeping things synchronous. That's probably what I'd do unless you have complex HTTP redirect/authentication/caching requirements.
      singulars
    3. COAs for "why" this solution works is that the view drawing code running on the main thread needs to know that you just changed the image of the image view. By calling setImage: in a background thread, presumably the main thread is never notified that there's new content to be drawn (until something else causes the view to be refreshed). It's possible you can get much worse behavior by doing this on the background thread -- e.g. if you change out the image while the main thread is in the middle of trying to draw it.
      singulars
 

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