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

#import <Z6MenuItemControlbar.h>

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

Instance Methods

(instancetype) - initWithFrame:andDelegate:
 
(void) - showBar:
 
(void) - fireRecipeCheck [implementation]
 
(void) - addMenuItemOnToday: [implementation]
 
(float) - heightRequirement [implementation]
 
(void) - appear: [implementation]
 

Properties

id< Z6MenuItemControlbarDelegate > delegate
 

Detailed Description

Definition at line 13 of file Z6MenuItemControlbar.h.

Method Documentation

◆ addMenuItemOnToday:()

- (void) addMenuItemOnToday: (UIButton *)  sender
implementation

Definition at line 54 of file Z6MenuItemControlbar.m.

54  :(UIButton *)sender {
55  NSLog(@"MenuItemControlbar.addMenuItemOnToday");
56  [_delegate addMenuItemOnToday:sender];
57 }

◆ appear:()

- (void) appear: (CGRect)  bound
implementation

Definition at line 64 of file Z6MenuItemControlbar.m.

64  :(CGRect)bound
65 {
66  ;
67 }

◆ fireRecipeCheck()

- (void) fireRecipeCheck
implementation

Definition at line 48 of file Z6MenuItemControlbar.m.

49 {
50  NSLog(@"MenuItemControlbar.fireRecipeCheck");
51  [_delegate fireRecipeCheck];
52 }

◆ heightRequirement()

- (float) heightRequirement
implementation

Definition at line 59 of file Z6MenuItemControlbar.m.

60 {
61  return requestDisplayHeight;
62 }
float requestDisplayHeight

◆ initWithFrame:andDelegate:()

- (instancetype) initWithFrame: (CGRect)  frame
andDelegate: (id<Z6MenuItemControlbarDelegate>)  delegate 

Definition at line 21 of file Z6MenuItemControlbar.m.

21  :(CGRect)frame andDelegate:(id<Z6MenuItemControlbarDelegate>) dele
22 {
23  self = [super initWithFrame:frame];
24  if (self) {
25 
26  _delegate = dele;
27  controlViewHeight = frame.size.height - 2;
28 
29  // add a button to update the selected menu item for today's (right now) meal
30  CGRect updateMenuIemButtonFrame = CGRectMake(2.0, 2.0, frame.size.width/2 - 4, controlViewHeight);
31  updateMenuItemButton = [[UIButton alloc] initWithFrame:updateMenuIemButtonFrame];
32  [updateMenuItemButton setTitle:@"update USDA" forState:UIControlStateNormal];
33  [updateMenuItemButton addTarget:self action:@selector(fireRecipeCheck) forControlEvents:UIControlEventTouchUpInside];
34  [self addSubview:updateMenuItemButton];
35  // end - add a button to update the selected menu item for today's (right now) meal
36 
37  // add a button to approve the selected menu item for today's (right now) meal
38  CGRect addToMenuButtonFrame = CGRectMake(frame.size.width/2 + 2, 2.0, frame.size.width/2 - 4, controlViewHeight);
39  menuItemTodayButton = [[UIButton alloc] initWithFrame:addToMenuButtonFrame];
40  [menuItemTodayButton setTitle:@"add menu item" forState:UIControlStateNormal];
41  [menuItemTodayButton addTarget:self action:@selector(addMenuItemOnToday:) forControlEvents:UIControlEventTouchUpInside];
42  [self addSubview:menuItemTodayButton];
43  // end - add a button to approve the selected menu item for today's (right now) meal
44  [self showBar:YES];
45  }
46  return self;
47 }
UIButton * menuItemTodayButton
float controlViewHeight

◆ showBar:()

- (void) showBar: (Boolean)  flag

Definition at line 68 of file Z6MenuItemControlbar.m.

68  :(Boolean)flag
69 {
70  if (flag) {
72  } else {
74  }
75 }
float controlViewHeight
float requestDisplayHeight

Property Documentation

◆ delegate

- (id<Z6MenuItemControlbarDelegate>) delegate
readwritenonatomicstrong

Definition at line 15 of file Z6MenuItemControlbar.h.


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