I have developed an app which uses Asyncimageview and iCarousel.But my issues is that when i’m trying to load the images from urls only activity indicator loads in each view of my iCarousel and no images are loaded.Here is my code
- (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSUInteger)index reusingView:(AsyncImageView *)view
{
if (view == nil
{
AsyncImageView * view = [[[AsyncImageView alloc]initWithFrame:CGRectMake(0, 0, 300, 280)] autorelease];
view.image=[UIImage imageNamed:@"infobg.png"];
view.imageURL=[imageURLs objectAtIndex:index];
}
return view;
}
Follow these steps maybe because of following reasons you may face this issue
— Check whether if ur imageURLs array is having objects under iCarousel are not…If its null you may have this kind of issue….
— Do array allocation and add objects in
method,because if you add objects in your array under viewDidLoad it won’t works because carousel view loads first before viewDidLoad method..
— if your array element is present even after these steps follow this code.
It will help you..