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.offscreenCells[(id<NSCopying>)cellClass(MWMEditorCellTypeNote)] = cell;
|
||||||
self.note = text;
|
self.note = text;
|
||||||
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[UIView setAnimationsEnabled:NO];
|
[UIView setAnimationsEnabled:NO];
|
||||||
[self.tableView refresh];
|
[self.tableView refresh];
|
||||||
|
[self.tableView layoutIfNeeded];
|
||||||
[UIView setAnimationsEnabled:YES];
|
[UIView setAnimationsEnabled:YES];
|
||||||
NSIndexPath * ip = [self.tableView indexPathForCell:cell];
|
});
|
||||||
[self.tableView scrollToRowAtIndexPath:ip
|
|
||||||
atScrollPosition:UITableViewScrollPositionBottom
|
|
||||||
animated:YES];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)cell:(MWMNoteCell *)cell didFinishEditingWithText:(NSString *)text { self.note = text; }
|
- (void)cell:(MWMNoteCell *)cell didFinishEditingWithText:(NSString *)text { self.note = text; }
|
||||||
|
|||||||
Reference in New Issue
Block a user