1

私はこの単純なコードを持っています:

-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    BGEditTextField * theTableViewCell = (BGEditTextField *) [self.tableView cellForRowAtIndexPath:indexPath];
    theTableViewCell.displaytextField =true;
    [self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];
    //self.helpFinishUpdating.viewNotToCover = theTableViewCell;
}

私が欲しい以外はすべて完璧です

self.helpFinishUpdating.viewNotToCover = theTableViewCell

完了後に実行さ
[self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];れます。

どうすればそれを達成できますか?

私がそうしたい理由self.helpFinishUpdating.viewNotToCover = theTableViewCell;は、のフレーム位置に敏感だからですUITableViewCellUITableViewCellそれを実行する前に、まず最終位置に到達してほしい。

4

1 に答える 1

1

UITableViewDelegateに準拠してUIScrollViewDelegateいるため、必要に応じて実装することができscrollViewDidEndDecelerating:ます。

于 2012-12-10T09:07:41.127 に答える