add message exercises
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
//
|
||||
// GiGaMasssagesVC.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/8/23.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GiGaMasssagesVC.h"
|
||||
#import "MAssaageCenterCell.h"
|
||||
#import "ActiveMesagelistVC.h"
|
||||
#import "GiGaServiceViewController.h"
|
||||
#import "GiGaSystemViewController.h"
|
||||
|
||||
@interface GiGaMasssagesVC ()
|
||||
|
||||
@property (nonatomic,strong)NSMutableArray *dataArr;
|
||||
|
||||
@end
|
||||
|
||||
@implementation GiGaMasssagesVC
|
||||
|
||||
- (void)viewDidLoad {
|
||||
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
self.title = @"消息中心";
|
||||
self.view.backgroundColor = GIGARGB(242, 242, 242, 1);
|
||||
_dataArr = [NSMutableArray new];
|
||||
[self.view addSubview:self.tableView];
|
||||
self.tableView.delegate = self;
|
||||
self.tableView.dataSource = self;
|
||||
self.tableView.separatorStyle = UITableViewCellSelectionStyleNone;
|
||||
self.tableView.tableFooterView = [[UIView alloc] init];
|
||||
self.tableView.backgroundColor = GIGARGB(242, 242, 242, 1);
|
||||
self.tableView.tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 5)];
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
|
||||
|
||||
return 3;
|
||||
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
return 80;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
|
||||
return 0.1;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
|
||||
return 10;
|
||||
}
|
||||
-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
|
||||
|
||||
return [[UIView alloc] init];
|
||||
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
MAssaageCenterCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MAssaageCenterCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle] loadNibNamed:@"MAssaageCenterCell" owner:self options:nil] lastObject];
|
||||
}
|
||||
|
||||
[cell loadCellDataAtIndex:indexPath];
|
||||
return cell;
|
||||
}
|
||||
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
|
||||
if (indexPath.section == 0) {
|
||||
ActiveMesagelistVC *activeVC = [[ActiveMesagelistVC alloc] init];
|
||||
[self.navigationController pushViewController:activeVC animated:YES];
|
||||
|
||||
}else if (indexPath.section == 1){
|
||||
GiGaServiceViewController *serviceVC = [[GiGaServiceViewController alloc] init];
|
||||
[self.navigationController pushViewController:serviceVC animated:YES];
|
||||
|
||||
}else{
|
||||
GiGaSystemViewController *systemVC = [[GiGaSystemViewController alloc] init];
|
||||
[self.navigationController pushViewController:systemVC animated:YES];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user