UIImageView setFrame: no funciona en UITableViewCell
Tengo unUIImageView
en personalizadoUITableViewCell
y quiero cambiar su tamaño, lo puse en modo IZQUIERDA. Para cambiar el tamaño estoy aplicando el código de abajo.
[cell.IBImage setFrame:CGRectMake(201,12,50,20)];
El ancho de mi imagen es de 100 y quiero reducirlo a 50, pero todavía me muestra el ancho de 100. Si configuro el modo de vista aScale To Fill
Funciona bien, pero quiero que su modo de visualización sea IZQUIERDA.
El método completo cellForRowAtIndexPath es el siguiente:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"DetailCell";
DetailCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"DetailCell" owner:self options:nil];
cell = (DetailCell *)[topLevelObjects objectAtIndex:0];
clsDetailResponse *Response = [self.Histories objectAtIndex:[indexPath row]];
[cell.IBUsernameLabel setText:[NSString stringWithFormat:@"%@ %@", Response.Firstname, Response.Lastname]];
[cell.IBImage setFrame:CGRectMake(201, 12, 50, 20)];
return cell;
}