summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2014-02-02 02:20:51 +0400
committerGravatar Vitaly Takmazov2014-02-02 02:20:51 +0400
commit4fd723c665a2b828447fcc9476c752803f76ea35 (patch)
treef4bd728cba48b69b659c2f986d12e7360d7b7141
parentd52c86da9751f221a24c21ec903656e279ba885a (diff)
revealview improvements
-rw-r--r--Juick/LoginViewController.m3
-rw-r--r--Juick/NavCell.m5
-rw-r--r--Juick/RevealPanelViewController.m15
3 files changed, 14 insertions, 9 deletions
diff --git a/Juick/LoginViewController.m b/Juick/LoginViewController.m
index 366ec96..f6859a7 100644
--- a/Juick/LoginViewController.m
+++ b/Juick/LoginViewController.m
@@ -8,6 +8,7 @@
#import "LoginViewController.h"
#import "User.h"
+#import "ColorScheme.h"
@implementation LoginViewController
@@ -15,6 +16,8 @@ static NSString *CellIdentifier = @"CellIdentifier";
-(void) viewDidLoad {
self.title = @"Sign in";
+ [self.view setBackgroundColor:[ColorScheme mainBackground]];
+
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel
target:self action:@selector(cancelSignIn)];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave
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);
}
diff --git a/Juick/RevealPanelViewController.m b/Juick/RevealPanelViewController.m
index 563e06d..3b6a446 100644
--- a/Juick/RevealPanelViewController.m
+++ b/Juick/RevealPanelViewController.m
@@ -47,8 +47,9 @@ static NSString *CellIdentifier = @"NavCell";
[self.tableView setBackgroundColor:[ColorScheme navbarBackground]];
self.tableView.delegate = self;
self.tableView.dataSource = self;
- self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
- self.tableView.separatorColor =[UIColor blackColor];
+ [self.tableView setSeparatorInset:UIEdgeInsetsZero];
+ self.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
+ self.tableView.separatorColor =[UIColor darkGrayColor];
[self.tableView registerClass:[NavCell class] forCellReuseIdentifier:CellIdentifier];
[self.view addSubview:self.tableView];
self.signButton = [[UIButton alloc] init];
@@ -116,8 +117,8 @@ static NSString *CellIdentifier = @"NavCell";
[cell.contentView setBackgroundColor:[ColorScheme navbarBackground]];
cell.iconLabel.font = [UIFont fontWithName:kFontAwesomeFamilyName size:32.f];
cell.iconLabel.textColor = [ColorScheme navbarFont];
- cell.iconLabel.backgroundColor = [ColorScheme navbarBackground];
- cell.descriptionTextLabel.backgroundColor = [ColorScheme navbarBackground];
+ //cell.iconLabel.backgroundColor = [ColorScheme navbarBackground];
+ //cell.descriptionTextLabel.backgroundColor = [ColorScheme navbarBackground];
cell.descriptionTextLabel.textColor = [ColorScheme navbarFont];
if (row == 0) {
cell.descriptionTextLabel.text = @"My feed";
@@ -133,8 +134,10 @@ static NSString *CellIdentifier = @"NavCell";
cell.descriptionTextLabel.text = @"Images";
cell.iconLabel.text = [NSString fontAwesomeIconStringForEnum:FAIconPicture];
}
- [cell setNeedsUpdateConstraints];
- [cell updateConstraintsIfNeeded];
+ UIView *bgColorView = [[UIView alloc] init];
+ bgColorView.backgroundColor = [UIColor blackColor];
+ bgColorView.layer.masksToBounds = YES;
+ [cell setSelectedBackgroundView:bgColorView];
[cell.contentView setNeedsLayout];
[cell.contentView layoutIfNeeded];
return cell;