summaryrefslogtreecommitdiff
path: root/Juick/NavCell.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-08-14 02:55:21 +0300
committerGravatar Vitaly Takmazov2016-08-14 02:55:21 +0300
commite32c85b7650c0869a2aa319111a837ede75669d1 (patch)
tree29dfae230aded06e9d70781a8d393818e0d926f1 /Juick/NavCell.m
parent934f816c2e0851ea7faf7c7e5c4a84779a4accfe (diff)
new navcell layout
Diffstat (limited to 'Juick/NavCell.m')
-rw-r--r--Juick/NavCell.m43
1 files changed, 0 insertions, 43 deletions
diff --git a/Juick/NavCell.m b/Juick/NavCell.m
deleted file mode 100644
index 8cd460a..0000000
--- a/Juick/NavCell.m
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-// NavCell.m
-// Juick
-//
-// Created by Vitaly on 17.12.13.
-// Copyright (c) 2013 com.juick. All rights reserved.
-//
-
-#import "NavCell.h"
-
-@interface NavCell ()
-
-@property (nonatomic, assign) BOOL didSetupConstraints;
-
-@end
-
-@implementation NavCell
-
-- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
-{
- self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
- if (self) {
- self.iconLabel = [[UILabel alloc] initWithFrame:CGRectZero];
- self.descriptionTextLabel = [[UILabel alloc] initWithFrame:CGRectZero];
- self.descriptionTextLabel.numberOfLines = 1;
- self.descriptionTextLabel.textAlignment = NSTextAlignmentLeft;
- [self.contentView addSubview:self.iconLabel];
- [self.contentView addSubview:self.descriptionTextLabel];
- }
- return self;
-}
-
-- (void)layoutSubviews {
- [super layoutSubviews];
-
- 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: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);
-}
-
-@end