UIImageView setFrame: не работает в UITableViewCell
веUIImageView
в индивидуальныеUITableViewCell
и я хочу изменить его размер, я установил режим просмотра влево. Чтобы изменить размер ям, применяя код ниже.
[cell.IBImage setFrame:CGRectMake(201,12,50,20)];
Ширина моего изображения равна 100, и я хочу уменьшить его до 50, но он все равно показывает ширину 100. Если я установлю режим просмотра наScale To Fill
это хорошо работает, но я хочу иметь этоРежим просмотра влево.
Полный метод cellForRowAtIndexPath приведен ниже:
- (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;
}