title: adding UIImageView in UIScrollview with large image blocks thread
body: <p>I am loading an image in a UIImageView which I then add to a UIScrollView.
  The image is a local image and is about 5000 pixels in height.</p>
  
  <p>The problem is that when I add the UIImageView to the UIScrollView the thread is blocked.
  It is obvious because when I do this I can not scroll the UIScrollView till the image is displayed.</p>
  
  <p>Here's the example.</p>
  
  <pre><code>UIScrollView *myscrollview = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 768, 1004)];
  myscrollview.contentSize = CGSizeMake(7680, 1004);
  myscrollview.pagingEnabled = TRUE;
  
  [self.view addSubview:myscrollview];
  
  NSString* str = [[NSBundle mainBundle] pathForResource:@"APPS.jpg" ofType:nil inDirectory:@""];
  NSData *imageData = [NSData dataWithContentsOfFile:str];
  UIImageView *singleImageView = [[UIImageView alloc] initWithImage:[UIImage imageWithData:imageData]];
  
      //the line below is the blocking line
  [scrollView addSubview:singleImageView];
  </code></pre>
  
  <p>It is the last line in the script that blocks the scroller. When I leave it out everything works perfect, except for the fact the image is not showing of course.</p>
  
  <p>I seem to recall that using multithreading does not work on UIView operations so I guess that's out of the question ass well.</p>
  
  <p>Thanks for your kind help.</p>