//
//  postMessageCategorySecondMessage.m
//  Open
//
//  Created by 看看智能 on 2017/3/10.
//  Copyright © 2017年 黄江涛 . All rights reserved.
//

#import "postMessageCategorySecondMessage.h"
#import "postMessageSecondViewController.h"
@interface postMessageCategorySecondMessage ()
@property (strong, nonatomic) IBOutlet UITableView *staictable;

@end

@implementation postMessageCategorySecondMessage

-(void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:YES];
    
    self.staictable.tableFooterView=[[UIView alloc]initWithFrame:CGRectZero];

    self.navigationController.toolbarHidden=NO;
    [self.navigationController.toolbar setTranslucent:YES];
    [self.navigationController.toolbar setTintColor:[UIColor whiteColor]];
    [self.navigationController.toolbar setBarTintColor:kRGBColor(27, 132, 208)];
    UIBarButtonItem *item2 =[[UIBarButtonItem alloc]initWithTitle:@"下一步" style:UIBarButtonItemStyleDone target:self action:@selector(titleAction)];
    UIBarButtonItem *fixibleSpace =[[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];
    NSArray *itemarray =@[fixibleSpace,item2,fixibleSpace];
    self.toolbarItems =itemarray;
}

- (void)viewDidLoad {
    [super viewDidLoad]; 
    
}
-(void)titleAction
{
    if(self.staictable.indexPathForSelectedRow.row ){
//    self.navigationController.toolbarHidden=YES;
        
    postMessageSecondViewController *bvc =[postMessageSecondViewController new];
    bvc.indexRow =self.staictable.indexPathForSelectedRow.row;
        [self.navigationController  pushViewController:bvc animated:YES];}else
        {
              postMessageSecondViewController *bvc =[postMessageSecondViewController new];
            bvc.indexRow =0;
            [self.navigationController  pushViewController:bvc animated:YES];
        }
}


@end
