rs/SDWebImage — Issue #46: the UITableViewCells imageView becomes bigger when selected?
Author: guoxj
Created: 2011-11-16 09:37:48+00:00
State: open

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *MyIdentifier = @"MyIdentifier";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];

if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:MyIdentifier] autorelease];
}

// Here we use the new provided setImageWithURL: method to load the web image
[cell.imageView setImageWithURL:[NSURL URLWithString:@"http://xxx.com/image.jpg"]
placeholderImage:[UIImage imageNamed:@"placeholder.png"]];

cell.textLabel.text = @"My Text";
return cell;
}
http://xxx.com/image.jpg is bigger than the cell image bounds,and placeholder.png is also bigger than the cell img,
when i selected the cell,the cell image becomes bigger,am i wrong?