| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- //
- // SignUpViewController.m
- // 千模
- //
- // Created by MUMEI on 2018/5/18.
- // Copyright © 2018年 MUMEI. All rights reserved.
- //
- #import "SignUpViewController.h"
- #import "SignViewCell.h"
- #import "ActivityDetailViewController.h"
- @interface SignUpViewController ()
- @property (weak, nonatomic) IBOutlet UITableView *tableView;
- @end
- @implementation SignUpViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
- self.tableView.tableHeaderView = self.headView;
- self.navigationItem.title = @"活动详情";
- UIButton * btn = [UIButton buttonWithType:UIButtonTypeCustom];
- btn.frame = CGRectMake(0, 0, 40, 40);
- [btn setImage:[UIImage imageNamed:@"fanhui2"] forState:UIControlStateNormal];
- btn.imageEdgeInsets = UIEdgeInsetsMake(0, -20, 0, 0);
- [btn addTarget:self action:@selector(backClick) forControlEvents:UIControlEventTouchUpInside];
- UIBarButtonItem *leftItem = [[UIBarButtonItem alloc] initWithCustomView:btn];
- UIBarButtonItem *nagetiveSpacer = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
- nagetiveSpacer.width = -12;//这个值可以根据自己需要自己调整
- self.navigationItem.leftBarButtonItems = @[nagetiveSpacer, leftItem];
- _tableView.showsVerticalScrollIndicator = NO;
- [_headView sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",imageURl,_model.pic]] placeholderImage:[UIImage imageNamed:@"jiazai"]];
- // Do any additional setup after loading the view.
- }
- -(void)backClick{
- [self.navigationController popViewControllerAnimated:YES];
- }
- //- (void)viewWillAppear:(BOOL)animated{
- // [self.navigationController setNavigationBarHidden:YES animated:YES];
- //}
- //
- //- (void)viewWillDisappear:(BOOL)animated{
- // [self.navigationController setNavigationBarHidden:NO animated:YES];
- //
- //}
- #pragma mark - deleDate
- -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
- return 1;
- }
- -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
-
- SignViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"SignViewCell"];
- if (!cell) {
- cell = [[[UINib nibWithNibName:@"SignViewCell" bundle:nil]instantiateWithOwner:self options:nil]lastObject];
- cell.selectionStyle = UIAccessibilityTraitNone;
- cell.model = _model;
- }
- return cell;
-
- }
- -(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
-
- return 1;
- }
- -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
- return 695;
- }
- - (IBAction)signUp:(id)sender {
- ActivityDetailViewController *aVc = [[ActivityDetailViewController alloc]init];
- if ([_model.issign isEqualToString:@"1"]) {
- [MBProgressHUD showTextHUD:@"不能重复报名" inView:self.view hideAfterDelay:1];
- }else{
- aVc.model = _model;
- [self.navigationController pushViewController:aVc animated:YES];
- }
- }
- - (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
- // Dispose of any resources that can be recreated.
- }
- @end
|