Posiadam podklasowy UITableViewCell.Nie można zaktualizować ramki obiektu UI w katalogu UITableViewCell
Potrzebuję dynamicznie zmieniać ramkę UILabel.
Oto co zrobiłem:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"messageCell";
MessageCell *cell = (MessageCell*) [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
cell.Content.Text = @"Content!";
[cell.Content setFrame:CGRectMake(0, 0, 10, 10)];
}
Tekst UILabel nie zmienia, więc nie jest to problem IBOutlet. Ramka pozostaje jednak taka sama jak zdefiniowano w IB.
Robiłem rzeczy, jak to już wcześniej, więc nie jestem pewien, co poszło nie tak tutaj ...
Dzięki za wszelką pomoc.
Edit:
używam
[self.tableView registerNib:[UINib nibWithNibName:@"MessageCell" bundle:nil]
forCellReuseIdentifier:@"MessageCell"];
w viewDidLoad
pozostaje ten sam niefortunny ... – BenB
Wielki Daniel to działało dla mnie. W końcu podałeś rozwiązanie bardzo znanego problemu. –