-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgressBarTableViewCell.m
78 lines (65 loc) · 3 KB
/
ProgressBarTableViewCell.m
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
78
//
// ProgressBarTableViewCell.m
// Let's Eat
//
// Created by Ryan Kass on 5/1/14.
// Copyright (c) 2014 Ryan Kass. All rights reserved.
//
#import "Graphics.h"
#import "ProgressBarTableViewCell.h"
#import "WhoViewController.h"
#import "WhatViewController.h"
#import "PriceViewController.h"
#import "CreateMealNavigationController.h"
@implementation ProgressBarTableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
// Initialization code
}
return self;
}
- (void)awakeFromNib
{
// Initialization code
}
-(void)setLayout:(NSString*)titleInput{
// [self.progressSlider setThumbImage:[[UIImage alloc] init] forState:UIControlStateNormal];
UIImageView* sliderfill = [[UIImageView alloc] initWithImage:GET_IMG(@"sliderfill2")];
if ([titleInput isEqualToString:@"Respond1"]){
[self.pathTitleButton setTitle:@"Respond" forState:UIControlStateNormal];
[sliderfill setFrame:CGRectMake(self.slidertrack.frame.origin.x, self.slidertrack.frame.origin.y, 213, self.slidertrack.frame.size.height)];
}
else if ([titleInput isEqualToString:@"Create Invitation"]){
[self.pathTitleButton setTitle:@"Create Invitation" forState:UIControlStateNormal];
[sliderfill setFrame:CGRectMake(self.slidertrack.frame.origin.x, self.slidertrack.frame.origin.y, 213, self.slidertrack.frame.size.height)];
}
else if ([titleInput isEqualToString:@"Create Invitation Button"]){
[self setBackgroundColor:[UIColor colorWithPatternImage:GET_IMG(@"createinvitation")]];
[sliderfill setFrame:CGRectMake(self.slidertrack.frame.origin.x, self.slidertrack.frame.origin.y, 320, self.slidertrack.frame.size.height)];
NSLog(@"my height %f", self.frame.size.height);
}
else if ([titleInput isEqualToString:@"Create Invitation Button2"]){
[self setBackgroundColor:[UIColor colorWithPatternImage:GET_IMG(@"respond")]];
[sliderfill setFrame:CGRectMake(self.slidertrack.frame.origin.x, self.slidertrack.frame.origin.y, 320, self.slidertrack.frame.size.height)];
NSLog(@"my height %f", self.frame.size.height);
}
else if ([titleInput isEqualToString:@"CI"]){
[self setBackgroundColor:[UIColor colorWithPatternImage:GET_IMG(@"createinvitation")]];
[sliderfill setFrame:CGRectMake(self.slidertrack.frame.origin.x, self.slidertrack.frame.origin.y, 320/3, self.slidertrack.frame.size.height)];
}
else if ([titleInput isEqualToString:@"Attend Meal"])
{
[self.pathTitleButton setTitle:@"Attend Meal" forState:UIControlStateNormal ];
}
[self addSubview:sliderfill];
[self setBackgroundColor:[UIColor colorWithRed:255 green:255 blue:255 alpha:.35]];
// [self.backgroundView setAlpha:.1];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end