-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
..
//this cell is custom cell.
[cell.textview setContentOffset:CGPointZero animated:YES]; //did not work
..
}
////////////////Как листать верхний UITextView "на UITableViewCell"
- (void)tableView:(UITableView *)tableView willDisplayCell:(CustomCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
..
[cell.textview setContentOffset:CGPointZero animated:YES]; //did not work
..
}
все из них не эффект. Прокрутка текста была показана снизу.
Я получил это сам
решение здесь.
- (void)tableView:(UITableView *)tableView willDisplayCell:(CouponCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
CGPoint bottomOffset = CGPointMake(0, cell.textview.frame.size.height - cell.textview.contentSize.height);
if (cell.textview.contentSize.height >= cell.textview.bounds.size.height) {
[cell.textview setContentOffset:bottomOffset animated:NO];
}else{
[cell.textview setContentOffset: CGPointMake(0,0) animated:NO];
}
}
прокрученный позитрон установлен (0,0) iOS внутри ... может быть. поэтому установка минус y значения.
Благодарим за ответ. хорошо провести день!
благодарю вас за ответ, но не работает. – Kernelzero