Groups list: Support dynamic fonts by enabling self-sizing table view cell, and use constraints to define the cell’s size.

vector-im/riot-meta#114
This commit is contained in:
Giom Foret
2017-12-28 12:02:21 +01:00
parent 33b75edcde
commit 75fffb405d
5 changed files with 37 additions and 54 deletions
+2 -9
View File
@@ -31,15 +31,6 @@
// Initialize unread count badge
[_missedNotifAndUnreadBadgeBgView.layer setCornerRadius:10];
_missedNotifAndUnreadBadgeBgViewWidthConstraint.constant = 0;
if ([UIFont respondsToSelector:@selector(systemFontOfSize:weight:)])
{
self.groupName.font = [UIFont systemFontOfSize:17 weight:UIFontWeightMedium];
}
else
{
self.groupName.font = [UIFont systemFontOfSize:17];
}
}
- (void)customizeTableViewCellRendering
@@ -77,6 +68,8 @@
}
}
// @TODO: Remove this method required by `MXKCellRendering` protocol.
// It is not used for the groups table view.
+ (CGFloat)heightForCellData:(MXKCellData *)cellData withMaximumWidth:(CGFloat)maxWidth
{
// The height is fixed