Today's Menu  Portugal
journal and plan nutrition
Z7EmpaneledTableView.m
Go to the documentation of this file.
1 //
2 // Z7EmpaneledTableView.m
3 // TodaysMenu
4 //
5 // Created by Don Zeek on 6/8/17.
6 // Copyright © 2017 net.dzeek.y2015.ios.portfolio. All rights reserved.
7 //
8 
10 #import "Z5DataController.h"
11 
12 @implementation Z7EmpaneledTableView
13 {
14  float headerHeight;
15  UIView<Z6ContainedView> *headerView;
16  float footerHeight;
17  UIView<Z6ContainedView> *footerView;
18 
20 }
21 
22 - (id) initWithFrame:(CGRect)frame
23 {
24  self = [super initWithFrame:frame style:UITableViewStylePlain];
25  if (self) {
26  headerHeight = 0.0f;
27  footerHeight = 0.0f;
28  }
29  return self;
30 }
31 - (void) measureForSectionHead:(float) headerHght
32 {
33  sectionHeaderHeight = headerHght;
34 }
35 - (void) spaceForSectionHead: (UIView<Z6ContainedView> *) headView
36 {
37  sectionHeaderHeight = [headView heightRequirement];
38  NSLog(@"Z7EmpaneledTableView.spaceForSectionHead: head: %3.2f", headerHeight);
39 }
40 
41 - (void) setViewForHead: (UIView<Z6ContainedView> *) headView
42 {
43  headerHeight = [headView heightRequirement];
44  NSLog(@"Z7EmpaneledTableView.setViewForHead: head: %3.2f", headerHeight);
45  [self setTableHeaderView:headView];
46 }
47 - (void) setViewForTail: (UIView<Z6ContainedView> *) tailView
48 {
49  footerHeight = [tailView heightRequirement];
50  [self setTableFooterView:tailView];
51 }
52 
53 //- (void) setViewForHead: (UIView<Z6ContainedView> *) headView ofSection: (NSInteger) section_n
54 //{
55 // headerHeight = [headView heightRequirement];
56 // NSLog(@"Z7EmpaneledTableView.setViewForSectHead: sect: %ld headerHeight: %3.2f", (long)section_n, headerHeight);
57 // [self setTableHeaderView:headView];
58 //}
59 //- (void) setViewForTail: (UIView<Z6ContainedView> *) tailView ofSection: (NSInteger) section_n
60 //{
61 // footerHeight = [tailView heightRequirement];
62 // [self setTableFooterView:tailView];
63 //}
64 
66 {
67  NSLog(@"Z7EmpaneledTableView.getHgtReq: head: %3.2f foot: %3.2f", headerHeight, footerHeight);
68  return headerHeight + sectionHeaderHeight + footerHeight;
69 }
70 
71 @end
UIView< Z6ContainedView > * footerView
float sectionHeaderHeight
float footerHeight
UIView< Z6ContainedView > * headerView