mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-22 14:13:45 +00:00
[ios] fix EditorVC NoteCell jumping while typing
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
de7f60ea37
commit
87cb0307cf
@@ -901,13 +901,12 @@ void registerCellsForTableView(std::vector<MWMEditorCellID> const & cells, UITab
|
||||
{
|
||||
self.offscreenCells[(id<NSCopying>)cellClass(MWMEditorCellTypeNote)] = cell;
|
||||
self.note = text;
|
||||
[UIView setAnimationsEnabled:NO];
|
||||
[self.tableView refresh];
|
||||
[UIView setAnimationsEnabled:YES];
|
||||
NSIndexPath * ip = [self.tableView indexPathForCell:cell];
|
||||
[self.tableView scrollToRowAtIndexPath:ip
|
||||
atScrollPosition:UITableViewScrollPositionBottom
|
||||
animated:YES];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[UIView setAnimationsEnabled:NO];
|
||||
[self.tableView refresh];
|
||||
[self.tableView layoutIfNeeded];
|
||||
[UIView setAnimationsEnabled:YES];
|
||||
});
|
||||
}
|
||||
|
||||
- (void)cell:(MWMNoteCell *)cell didFinishEditingWithText:(NSString *)text { self.note = text; }
|
||||
|
||||
Reference in New Issue
Block a user