summaryrefslogtreecommitdiff
path: root/Juick/RevealPanelViewController.m
blob: 7053832b20e1b0bca310ce5aee1f6278f420df52 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//
//  RevealPanelViewController.m
//  Juick
//
//  Created by Vitaly Takmazov on 04.11.13.
//  Copyright (c) 2013 com.juick. All rights reserved.
//

#import "RevealPanelViewController.h"

#import "ColorsAndButtons.h"

@interface RevealPanelViewController ()

@end

@implementation RevealPanelViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	[self.navigationController.navigationBar.topItem
     setTitleView:[[UIImageView alloc] initWithImage:[ColorsAndButtons logo]]];
    [self.view setBackgroundColor:[ColorsAndButtons navbarBackground]];
    self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    self.tableView.separatorColor =[UIColor blackColor];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 4;
}

- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *cellIdentifier = @"MenuCell";
    UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
    NSInteger row = indexPath.row;
    if (cell == nil) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
        [cell setBackgroundColor:[ColorsAndButtons navbarBackground]];
        cell.textLabel.textColor = [ColorsAndButtons navbarFont];
    }
    if (row == 0) {
        cell.textLabel.text = @"My feed";
        [cell.imageView setImage:[ColorsAndButtons homeImage]];
        
    } else if (row == 1) {
        cell.textLabel.text = @"Popular";
    } else if (row == 2) {
        cell.textLabel.text = @"Discover";
        [cell.imageView setImage:[ColorsAndButtons discoverImage]];
    } else if (row == 3) {
        cell.textLabel.text = @"Images";
    }
    return cell;
}

@end