14 id<V7UsdaFoodsTableDelegate> dataDelegate;
16 - (id) initWithFrame:(CGRect)frame
17 andHeader:(UIView *)headerView
18 inContainer:(
id<V7UsdaFoodsTableDelegate>) container
20 NSLog(
@"Z7UsdaFoodsTableView.init");
23 [
self setTableHeaderView:headerView];
25 self.dataSource =
self;
27 dataDelegate = container;
37 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
39 NSArray<NSDictionary *> *foodEntries = [dataDelegate retrieveFoodEntries];
40 NSInteger nMesgs = [foodEntries count];
44 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
46 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"todays-menu"];
47 NSLog(
@"V7UsdaFoodsTableView.cellForRow: cell: %@", cell);
49 cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"todays-menu"];
51 cell.contentView.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
53 CGRect contentRect = [cell.contentView frame];
54 CGRect fetchPublishButton1Frame = CGRectMake(contentRect.size.width - 86.0f, 5.0, 34.0f, contentRect.size.height - 10);
55 UIButton *pushMe = [[UIButton alloc] initWithFrame:fetchPublishButton1Frame];
56 [pushMe setTitle:@"GO" forState:UIControlStateApplication];
58 [cell.contentView addSubview:pushMe];
61 NSArray<NSDictionary *> *foodEntries = [dataDelegate retrieveFoodEntries];
62 NSInteger nMesgs = [foodEntries count];
64 if (nMesgs > [indexPath row]) {
65 NSDictionary *foodForCell = [foodEntries objectAtIndex:[indexPath row]];
66 NSString *caption = [foodForCell objectForKey:@"name"];
76 NSArray<NSDictionary *> *foodEntries = [dataDelegate retrieveFoodEntries];
77 NSInteger nFoods = [foodEntries count];
80 NSLog(
@"V7UsdaFoodsTableView.getViewHeightReqmt: ret: %3.2f", ret);
84 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
id initWithFrame:(CGRect frame)
instancetype sharedInstance()
float getViewHeightReqmt()
float getViewHeightReqmt()
Singleton interface to both core and remote data sources.
void labelizeCell:withText:inColor:andDetail:(UITableViewCell *targCell, [withText] NSString *txt, [inColor] UIColor *color, [andDetail] NSString *detailTxt)