mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 07:42:40 +00:00
UX Rework - Add home page:
Scroll to the top the section when the user taps on section header. https://github.com/vector-im/riot-meta/issues/75
This commit is contained in:
parent
5162517122
commit
f425541761
1 changed files with 6 additions and 0 deletions
|
@ -113,6 +113,12 @@
|
|||
UIView *view = gestureRecognizer.view;
|
||||
NSInteger section = view.tag;
|
||||
|
||||
// Scroll to the top this section
|
||||
if ([self.recentsTableView numberOfRowsInSection:section] > 0)
|
||||
{
|
||||
[self.recentsTableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:section] atScrollPosition:UITableViewScrollPositionTop animated:YES];
|
||||
}
|
||||
|
||||
// Scroll to the beginning the corresponding rooms collection.
|
||||
UITableViewCell *firstSectionCell = [self.recentsTableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:section]];
|
||||
if (firstSectionCell && [firstSectionCell isKindOfClass:TableViewCellWithCollectionView.class])
|
||||
|
|
Loading…
Reference in a new issue