This commit is contained in:
lianxiang
2018-09-21 18:27:32 +08:00
parent f2729d343e
commit db1740e72b
573 changed files with 53631 additions and 3597 deletions
@@ -0,0 +1,113 @@
//
// GIGaMaskShareViewController.m
// GIGA
//
// Created by lianxiang on 2018/9/21.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "GIGaMaskShareViewController.h"
#import "MaskTimeEndViewImgaeCell.h"
#import "MaskTimeTimeViewCell.h"
#import "MaskTimeEndActionViewCell.h"
#import "ShareViewController.h"
@interface GIGaMaskShareViewController ()
@end
@implementation GIGaMaskShareViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self addNavTitile:@"面膜时间"];
[self.view addSubview:self.tableView];
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.tableView.backgroundColor = [UIColor whiteColor];
self.tableView.separatorStyle = UITableViewCellSelectionStyleNone;
self.tableView.sectionFooterHeight = 0;
self.tableView.estimatedSectionFooterHeight= 0;
self.tableView.estimatedSectionHeaderHeight = 0;
//self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0,self.view.frame.size.width, 30)];
self.tableView.frame = CGRectMake(0,0,KMainW, self.view.frame.size.height);
// Do any additional setup after loading the view.
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
return 3;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return 1;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.section == 0) {
MaskTimeEndViewImgaeCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MaskTimeEndViewImgaeCell"];
if (!cell) {
cell = [[[NSBundle mainBundle] loadNibNamed:@"MaskTimeEndViewImgaeCell" owner:self options:nil] lastObject];
}
return cell;
}else if (indexPath.section == 1){
MaskTimeTimeViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MaskTimeTimeViewCell"];
if (!cell) {
cell = [[[NSBundle mainBundle] loadNibNamed:@"MaskTimeTimeViewCell" owner:self options:nil] lastObject];
}
return cell;
}else if (indexPath.section == 2){
MaskTimeEndActionViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MaskTimeEndActionViewCell"];
if (!cell) {
cell = [[[NSBundle mainBundle] loadNibNamed:@"MaskTimeEndActionViewCell" owner:self options:nil] lastObject];
}
[cell.changeBackBtn addTarget:self action:@selector(changeBackBtnAction) forControlEvents:UIControlEventTouchUpInside];
[cell.shareBtn addTarget:self action:@selector(shareBtnAction) forControlEvents:UIControlEventTouchUpInside];
return cell;
}
return nil;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.section == 0) {
return 285;
}else if (indexPath.section == 1){
return 205;
}
return 90;
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
return 0.1;
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{ return 0.1;
}
#pragma mark changeBackBtnAction
-(void)changeBackBtnAction{
}
#pragma mark share
-(void)shareBtnAction{
ShareViewController *share = [[ShareViewController alloc] init];
[self presentViewController:share animated:NO completion:nil];
}
@end