1

我有一些这样的代码:在 aviewcontroller中,我有 atable view和 a scrollview(那里有一些按钮),
在表格视图单元格中:

-(void) setImageOfImageView: (NSURL *) _imageURL
{
    [_imageView setImageWithURL:_imageURL 
               placeholderImage:[UIImage imageNamed:@"document-placeHolder-Image.png"]];
    [self setNeedsLayout];
}

按钮是这样的:

for(...)
{
    _request = ....;
    _buttonRequestOperation=[AFImageRequestOperation imageRequestOperationWithRequest:_request
   imageProcessingBlock:nil
   success:^(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image) 
{
 //create an uibutton,use the image for background
}
     failure:nil];
    [[[self class] sharedButtonRequestOperationQueue] addOperation:_buttonRequestOperation];
}

表格视图单元格中的图像有时会显示按钮图像,而按钮则显示表格视图单元格的图像。你有什么建议吗?
谢谢

4

0 回答 0