//
//  SalesInputTableViewCell.m
//  vanke
//
//  Created by Z on 16/4/18.
//  Copyright © 2016年 gomore. All rights reserved.
//

#import "SalesInputTableViewCell.h"

@interface SalesInputTableViewCell ()<UITextFieldDelegate>
@property (weak, nonatomic) IBOutlet UITextField *textFieldAmount;

@end

@implementation SalesInputTableViewCell

- (void)awakeFromNib {
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.textFieldAmount.delegate = self;
//    self.txtfieldSum.delegate = self;
    
        // Initialization code
}

- (void)cellWithArray:(NSArray *)array {
    
    self.textFieldAmount.text = array[0];
//    self.txtfieldSum.text = [array[1] isEqualToString:@"0"] ? @"" : array[0];
}

//结束编辑
- (void)textFieldDidEndEditing:(UITextField *)textField {
    NSLog(@"textField end editing");
    
    self.updateCellData(@[self.textFieldAmount.text]);
}

- (void)textFieldDidBeginEditing:(UITextField *)textField
{
    [textField selectAll:self];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
