Today's Menu  Portugal
journal and plan nutrition
Instance Methods | List of all members
Z3MenuConsumedView Class Reference

#import <Z3MenuConsumedView.h>

Inheritance diagram for Z3MenuConsumedView:
Inheritance graph
[legend]
Collaboration diagram for Z3MenuConsumedView:
Collaboration graph
[legend]

Instance Methods

(instancetype) - initWithDelegate:
 
(float) - heightRequirement [implementation]
 
(void) - appear: [implementation]
 
(void) - clickedSkipped [implementation]
 
(void) - clickedConsumed [implementation]
 

Detailed Description

Definition at line 13 of file Z3MenuConsumedView.h.

Method Documentation

◆ appear:()

- (void) appear: (CGRect)  bound
implementation

Definition at line 37 of file Z3MenuConsumedView.m.

37  :(CGRect)bound
38 {
39  [self setBackgroundColor:[UIColor lightGrayColor]];
40 
41  CGRect cancelButtonFrame = CGRectMake(2.0, 2.0, bound.size.width/2 - 4, consumeMealBarViewHeight - 4.0);
42  cancelButton = [[UIButton alloc] initWithFrame:cancelButtonFrame];
43  [cancelButton setTitle:@"skipped" forState:UIControlStateNormal];
44  [cancelButton addTarget:self action:@selector(clickedSkipped) forControlEvents:UIControlEventTouchUpInside];
45  [self addSubview:cancelButton];
46 
47  // add a button to consume the selected menu item for today's (right now) meal
48  CGRect consumedButtonFrame = CGRectMake(bound.size.width/2 + 2, 2.0, bound.size.width/2 - 4,consumeMealBarViewHeight - 4.0);
49  consumedButton = [[UIButton alloc] initWithFrame:consumedButtonFrame];
50  [consumedButton setTitle:@"finished" forState:UIControlStateNormal];
51  [consumedButton addTarget:self action:@selector(clickedConsumed) forControlEvents:UIControlEventTouchUpInside];
52  [self addSubview:consumedButton];
53  // end - add a button to consume the selected menu item for today's (right now) meal
54 /*
55  CGRect timePickerFrame = CGRectMake(2.0, consumeMealBarViewHeight + 4.0, bound.size.width - 6.0, timePickerHeight);
56  UIDatePicker *mealConsumptionDateSet = [[UIDatePicker alloc] initWithFrame:timePickerFrame];
57  [self addSubview:mealConsumptionDateSet];
58 
59  CGRect starRatingFrame = CGRectMake(2.0, consumeMealBarViewHeight + 4.0 + timePickerHeight + 4.0, bound.size.width - 6.0, starRatingHeight);
60  starRating = [[DLStarRatingControl alloc] initWithFrame:starRatingFrame];
61  [self addSubview:starRating];
62  */
63 
64 }
UIButton * consumedButton
float consumeMealBarViewHeight

◆ clickedConsumed()

- (void) clickedConsumed
implementation

Definition at line 72 of file Z3MenuConsumedView.m.

73 {
74  NSLog(@"MenuConsumedBar.clickedConsumed");
75  [menuConsumedDelegate didTapConsumedFooter];
76 }

◆ clickedSkipped()

- (void) clickedSkipped
implementation

Definition at line 66 of file Z3MenuConsumedView.m.

67 {
68  NSLog(@"MenuConsumedBar.clickedSkipped");
69  [menuConsumedDelegate didTapSkippedFooter];
70 }

◆ heightRequirement()

- (float) heightRequirement
implementation

Definition at line 32 of file Z3MenuConsumedView.m.

33 {
34  float ret = consumeMealBarViewHeight;
35  return ret;
36 }
float consumeMealBarViewHeight

◆ initWithDelegate:()

- (instancetype) initWithDelegate: (id<Z3MenuConsumedDelegate>)  delegate

Definition at line 23 of file Z3MenuConsumedView.m.

23  :(id<Z3MenuConsumedDelegate>) delegate
24 {
25  self = [super init];
26  if (self) {
28  }
29  return self;
30 }
id< Z3MenuConsumedDelegate > menuConsumedDelegate
id< U7ParamEditControlDelegate > delegate

The documentation for this class was generated from the following files: