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

#import <Z7MessagesPanelTableView.h>

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

Instance Methods

(id) - initWithFrame:andComponents:inContainer:
 
(id) - initWithFrame:andComponents:inContainer: [implementation]
 
(float) - getViewHeightReqmt [implementation]
 
(void) - initRemoveGesture [implementation]
 
(void) - didSwipeMenu: [implementation]
 
(void) - tableView:didSelectRowAtIndexPath: [implementation]
 
- Instance Methods inherited from Z7EmpaneledTableView
(id) - initWithFrame:
 
(void) - setViewForHead:
 
(void) - spaceForSectionHead:
 
(void) - measureForSectionHead:
 
(void) - setViewForTail:
 

Properties

EmailMessagefocusEmailMsg
 

Detailed Description

Definition at line 13 of file Z7MessagesPanelTableView.h.

Method Documentation

◆ didSwipeMenu:()

- (void) didSwipeMenu: (UIGestureRecognizer *)  gestureRecognizer
implementation

Definition at line 145 of file Z7MessagesPanelTableView.m.

145  :(UIGestureRecognizer *)gestureRecognizer {
146 
147  if (gestureRecognizer.state == UIGestureRecognizerStateEnded) {
148  CGPoint swipeLocation = [gestureRecognizer locationInView:self];
149  swipedMenuIndexPath = [self indexPathForRowAtPoint:swipeLocation];
150  UITableViewCell* swipedCell = [self cellForRowAtIndexPath:swipedMenuIndexPath];
151  // NSLog(@"Z7MessagesPanelTableView.didSwipeMenu: cell row: %ld", (long)[swipedMenuIndexPath row]);
152  [swipedCell setBackgroundColor:[UIColor orangeColor]];
153 
154 // Z5LocalDataController *localData = [[Z5DataController sharedInstance] localDataController];
155  NSInteger nRow = [swipedMenuIndexPath row];
156  [dataDelegate messageSwiped:nRow];
157 
158  // [self updateMenu:[localData todaysMenuItems]];
159  [self reloadData];
160  }
161 }
NSIndexPath * swipedMenuIndexPath

◆ getViewHeightReqmt()

- (float) getViewHeightReqmt
implementation
msc_inline_mscgraph_8

Reimplemented from Z7EmpaneledTableView.

Definition at line 125 of file Z7MessagesPanelTableView.m.

126 {
127  NSArray<EmailMessage *> *eMessages = [dataDelegate retrieveEmailMessages];
128  NSInteger nMesgs = [eMessages count];
129 
130  float headersRequirement = [super getViewHeightReqmt];
131  // float extraMargin = 8; // oddly, give correct visual align on zod
132  float extraMargin = 0; // oddly, give correct visual align
133  float ret = headersRequirement + nMesgs * (44.0 + extraMargin);
134  NSLog(@"MessagesPanelTableView.getViewHeightReqmt: headersRequirement: %3.2f, messages: %ld", headersRequirement, (long)nMesgs);
135  NSLog(@"MessagesPanelTableView.getViewHeightReqmt: table bounds hwight: %3.2f", self.bounds.size.height);
136  return ret;
137 }

◆ initRemoveGesture()

- (void) initRemoveGesture
implementation

Definition at line 139 of file Z7MessagesPanelTableView.m.

140 {
141  UISwipeGestureRecognizer *gesture = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(didSwipeMenu:)];
142  gesture.direction = UISwipeGestureRecognizerDirectionRight;
143  [self addGestureRecognizer:gesture];
144 }

◆ initWithFrame:andComponents:inContainer:() [1/2]

- (id) initWithFrame: (CGRect)  frame
andComponents: (NSArray *)  components
inContainer: (id< Z7MessagesTableDelegate >)  container 

◆ initWithFrame:andComponents:inContainer:() [2/2]

- (id) initWithFrame: (CGRect)  frame
andComponents: (NSArray<NSDictionary *>*)  components
inContainer: (id<Z7MessagesTableDelegate>)  container 
implementation

Definition at line 20 of file Z7MessagesPanelTableView.m.

20  :(CGRect)frame
21  andComponents:(NSArray<NSDictionary *>*)components
22  inContainer:(id<Z7MessagesTableDelegate>) container
23 {
24  NSLog(@"Z7MessagesPanelTableView.init: components: %@", components);
25 
26  self = [super initWithFrame:frame];
27 
28  // [self setBackgroundColor:[[Z5DataController sharedInstance] wheatColor]];
29  // self.dataSource = self;
30  self.dataSource = container;
31  [self setDelegate:self];
32 
33  dataDelegate = container;
34 
35  mDateFormatter = [[NSDateFormatter alloc] init];
36  [mDateFormatter setTimeStyle:NSDateFormatterNoStyle];
37  [mDateFormatter setDateStyle:NSDateFormatterMediumStyle];
38 
39  [self initRemoveGesture];
40 
41  return self;
42 }
NSDateFormatter * mDateFormatter

◆ tableView:didSelectRowAtIndexPath:()

- (void) tableView: (UITableView *)  tableView
didSelectRowAtIndexPath: (NSIndexPath *)  indexPath 
implementation

Definition at line 163 of file Z7MessagesPanelTableView.m.

163  :(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
164  // int row = (int)[indexPath row];
165 
166  /*
167  Z5EmailDataController *eMailCntrlr = [[[Z5DataController sharedInstance] remoteDataController] emailDataController];
168 
169  _focusEmailMsg = [[dataDelegate retrieveEmailMessages] objectAtIndex:[indexPath row]];
170  NSLog(@"MessagesPanelTableView.tableView:didSelectRowAtIndexPath: focusEmail: bodytext: %@ date: %@ name: %@ randomkey: %@ remoteUniqueId: %@ uid: %@", [_focusEmailMsg bodytext], [_focusEmailMsg date], [_focusEmailMsg name], [_focusEmailMsg randomkey], [_focusEmailMsg remoteUniqueIID], [_focusEmailMsg uid]);
171 
172  NSString *caption = [_focusEmailMsg name];
173 
174  NSLog(@"MessagesPanelTableView.tableView:didSelectRowAtIndexPath: row: %d caption: %@", row, caption);
175 
176  NSInteger focusEmailMsgUid = [_focusEmailMsg.uid integerValue];
177 
178  if ([_focusEmailMsg randomkey]) {
179  NSData *mphoto = [_focusEmailMsg photo];
180  UIImage *mPhotoImage = [UIImage imageWithData:_focusEmailMsg.photo];
181  [dataDelegate updateHTML:[_focusEmailMsg bodytext]];
182  } else {
183  [eMailCntrlr retrieveMessageStructure:focusEmailMsgUid fromFolder:@"INBOX"];
184  [eMailCntrlr retrieveTotalMessageHTML:focusEmailMsgUid fromFolder:@"INBOX" toDelegate:dataDelegate];
185  }
186 
187  [self showFoot:YES];
188  [self reloadData];
189  [self setNeedsDisplay];
190  [self scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:YES];
191  */
192 }

Property Documentation

◆ focusEmailMsg

- (EmailMessage*) focusEmailMsg
readwritenonatomicstrong

Definition at line 15 of file Z7MessagesPanelTableView.h.


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