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

#import <V3GalleryMenuItemControlbarView.h>

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

Instance Methods

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

Detailed Description

Definition at line 20 of file V3GalleryMenuItemControlbarView.h.

Method Documentation

◆ appear:()

- (void) appear: (CGRect)  bound
implementation

Definition at line 58 of file V3GalleryMenuItemControlbarView.m.

58  :(CGRect)bound {
59  float controlbarWidth = bound.size.width;
60 
61  CGRect labelFrame = CGRectMake(0, 0, controlbarWidth, 32);
62  CGRect galleryPickerFrame = CGRectMake(0, 32, controlbarWidth, 48);
63  CGRect plusButtonFrame = CGRectMake(controlbarWidth - 48, 2, 44, 44);
64 
65  NSString *headerText = [mTimeOfDayFormatter stringFromDate:[NSDate dateWithTimeIntervalSinceNow:0]];
66  [Z5DataController labelize:label withText:headerText];
67  [label setFrame:labelFrame];
68 
69  [kitchenPickerView selectRow:[mDelegate getKitchenFocusGallery] inComponent:0 animated:YES];
70  [kitchenPickerView setFrame:galleryPickerFrame];
71 
72  [plusButton setFrame:plusButtonFrame];
73  [self bringSubviewToFront:plusButton];
74 }
Singleton interface to both core and remote data sources.
void labelize:withText:(UILabel *targLabel, [withText] NSString *txt)

◆ heightRequirement()

- (float) heightRequirement
implementation

Definition at line 76 of file V3GalleryMenuItemControlbarView.m.

76  {
77  return heightRequired;
78 }

◆ initWithFrame:andDelegate:()

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

Definition at line 25 of file V3GalleryMenuItemControlbarView.m.

25  :(CGRect)frame andDelegate:(id<V3GalleryMenuItemControlbarProtocol>)delegate
26 {
27  self = [super initWithFrame:frame];
28  if (self) {
29  mDelegate = delegate;
30 
31  mTimeOfDayFormatter = [[NSDateFormatter alloc] init];
32  [mTimeOfDayFormatter setDateStyle:NSDateFormatterNoStyle];
33  [mTimeOfDayFormatter setTimeStyle:NSDateFormatterShortStyle];
34 
35  label = [[UILabel alloc] init];
36  [label setTextAlignment:NSTextAlignmentCenter];
37  [self addSubview:label];
38 
39  kitchenPickerView = [[UIPickerView alloc] init];
40  [kitchenPickerView setDelegate:mDelegate];
41  [kitchenPickerView setDataSource:mDelegate];
42  [kitchenPickerView setBackgroundColor:[UIColor wheatColor]];
43  [self addSubview:kitchenPickerView];
44 
45  plusButton = [[UIButton alloc] init];
46  [plusButton addTarget:mDelegate action:@selector(clickPlusButton) forControlEvents:UIControlEventTouchUpInside];
47  UIImage *plusButtonImage = [UIImage imageNamed:@"plusSign.png"];
48  [plusButton setImage:plusButtonImage forState:UIControlStateNormal];
49  [self addSubview:plusButton];
50 
51  heightRequired = 80;
52 
53  }
54 
55  return self;
56 }
id< U7ParamEditControlDelegate > delegate

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