summaryrefslogtreecommitdiff
path: root/Juick/NavCell.m
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/NavCell.m')
-rw-r--r--Juick/NavCell.m5
1 files changed, 2 insertions, 3 deletions
diff --git a/Juick/NavCell.m b/Juick/NavCell.m
index 594b23b..8cd460a 100644
--- a/Juick/NavCell.m
+++ b/Juick/NavCell.m
@@ -20,7 +20,6 @@
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
- self.backgroundColor = [UIColor blackColor];
self.iconLabel = [[UILabel alloc] initWithFrame:CGRectZero];
self.descriptionTextLabel = [[UILabel alloc] initWithFrame:CGRectZero];
self.descriptionTextLabel.numberOfLines = 1;
@@ -34,9 +33,9 @@
- (void)layoutSubviews {
[super layoutSubviews];
- CGRect iconRect = [UILabel sizeForLabel:self.iconLabel width:320.0f];
+ CGRect iconRect = [UILabel sizeForLabel:self.iconLabel width:36.0f];
self.iconLabel.frame = CGRectMake(10, 10, iconRect.size.width, iconRect.size.height);
- float textHeight = [UILabel sizeForLabel:self.descriptionTextLabel width:320.0f].size.height;
+ float textHeight = [UILabel sizeForLabel:self.descriptionTextLabel width:self.contentView.bounds.size.width].size.height;
self.descriptionTextLabel.frame = CGRectMake(10 + self.iconLabel.frame.size.width + 10, 10 + (iconRect.size.height - textHeight) / 2,
self.contentView.bounds.size.width - self.iconLabel.frame.size.width - 10*3, textHeight);
}