O quadro não está sendo alterado no cellForRowAtIndexPath
Quero alterar o quadro da posição x deview
dentro da célulacellForRowAtIndexPath
para certas condições. Eu usei o seguinte código. Mas isso não muda a visãox position
quadro, Armação.
- (void)viewDidLoad {
[super viewDidLoad];
UINib *nib = [UINib nibWithNibName:@"GoalDetailsCustomCardCell" bundle:nil];
[goalDetailsTableView registerNib:nib forCellReuseIdentifier:@"CardCell"];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
GoalDetailsTableViewCell *cell = [goalDetailsTableView dequeueReusableCellWithIdentifier:@"CardCell"];
if(cell == nil)
{
cell = [goalDetailsTableView dequeueReusableCellWithIdentifier:@"CardCell"];
}
NSLog(@"%f", cell.cardDetails.frame.origin.x);
[UIView animateWithDuration: 0.5 animations:^{
cell.cardDetails.frame = CGRectOffset(cell.cardDetails.frame, -322.0, 0.0);
// CGRectOffset(cell.cardView.frame, -320.0, 0.0);
cell.actionCardReminder.frame = CGRectOffset(cell.actionCardReminder.frame, -322.0, 0.0);
}];
NSLog(@"%f", cell.cardDetails.frame.origin.x);
return cell;
}
A exibição na célula se movendo conforme o esperado, mas não para o lado negativo. Ainda está mostrando a visualização cardDetails, não a visualização actionCardReminder.
Nota: O NSLog mostra o quadro da vista como alterar a posição x, mas a vista não está se movendo para a posição -322,0.