14 id<Z7MessagesTableDelegate> dataDelegate;
20 - (id) initWithFrame:(CGRect)frame
21 andComponents:(NSArray<NSDictionary *>*)components
22 inContainer:(
id<Z7MessagesTableDelegate>) container
24 NSLog(
@"Z7MessagesPanelTableView.init: components: %@", components);
30 self.dataSource = container;
31 [
self setDelegate:self];
33 dataDelegate = container;
36 [mDateFormatter setTimeStyle:NSDateFormatterNoStyle];
37 [mDateFormatter setDateStyle:NSDateFormatterMediumStyle];
127 NSArray<EmailMessage *> *eMessages = [dataDelegate retrieveEmailMessages];
128 NSInteger nMesgs = [eMessages count];
132 float extraMargin = 0;
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);
141 UISwipeGestureRecognizer *gesture = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(didSwipeMenu:)];
142 gesture.direction = UISwipeGestureRecognizerDirectionRight;
143 [
self addGestureRecognizer:gesture];
145 -(void)didSwipeMenu:(UIGestureRecognizer *)gestureRecognizer {
147 if (gestureRecognizer.state == UIGestureRecognizerStateEnded) {
148 CGPoint swipeLocation = [gestureRecognizer locationInView:self];
150 UITableViewCell* swipedCell = [
self cellForRowAtIndexPath:swipedMenuIndexPath];
152 [swipedCell setBackgroundColor:[UIColor orangeColor]];
155 NSInteger nRow = [swipedMenuIndexPath row];
156 [dataDelegate messageSwiped:nRow];
163 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
id initWithFrame:(CGRect frame)
float getViewHeightReqmt()
NSDateFormatter * mDateFormatter
float getViewHeightReqmt()
NSIndexPath * swipedMenuIndexPath