scrollview sometimes is not displayed
===

in my application i have a cameraa , i save the pictures that the user takes as assets in an album. In the viewDidLoad method i load the assets using blocks. In the viewWillLayoutSubviews method, i put the images into a uiscrollview and display the scrollview to the view. The problem is that sometimes the view appears before the viewwilllayoutsubviews method is called and so it is displayed without the scrollview. I tried to put the code for  displaying the scrollview at the viewWillAppear method but then the array that holds the assets is empty . I tried also to put the code that loads the assets to the array using blocks to another class and then pass the array as parameter, but then the [asset] fullscreenimage  method did not work . only the asset thumbnail.Could you tell me if there is another way to handle the display of the scrollview? I would appreciate any help. Thank you in advance. The code that displays the scrollview is as follows:

    allImages=[[NSMutableArray alloc] init];
    int iAsset;
    for (iAsset=0; iAsset<[assets count]; iAsset++) {
    ALAsset *lastPicture = [assets objectAtIndex:iAsset];         
    UIImage *image=[UIImage imageWithCGImage:[[lastPicture   
    defaultRepresentation]fullScreenImage]];
    [allImages addObject:image];     
    }
    CGRect fullScreenRect=[[UIScreen mainScreen] applicationFrame];
    CGFloat pageWidth = scroll.frame.size.width;
    int page = floor((scroll.contentOffset.x - pageWidth / 2) / pageWidth) + 1;
    pageNumber=[NSNumber numberWithInt:page];
    scroll.pagingEnabled=YES;
    scroll.scrollEnabled = YES;
    scroll.clipsToBounds = YES;
    NSInteger numberOfViews = [allImages count];
    for (int i = 0; i < numberOfViews; i++) {
    CGFloat yOrigin = i * self.view.frame.size.width;
    UIView *awesomeView = [[UIView alloc] initWithFrame:CGRectMake(yOrigin, 0,    
    scroll.frame.size.width,scroll.frame.size.height)];
    UIImage *originalImage=[allImages objectAtIndex:i];
    UIImageView *imagesView=[[UIImageView alloc] initWithImage:originalImage];
    imagesView.frame=CGRectMake(0, 0, scroll.frame.size.width, scroll.frame.size.
    height);
    imagesView.userInteractionEnabled=YES;
    [awesomeView addSubview:imagesView];
    [scroll addSubview:awesomeView];    
    }
    scroll.contentSize = CGSizeMake(self.view.frame.size.width * numberOfViews,  
    self.view.frame.size.
    [self.view addSubview:scroll];
