CoaApplyProtocolCell.m 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // CoaApplyProtocolCell.m
  3. // LN_School
  4. //
  5. // Created by EchoShacolee on 2017/12/12.
  6. // Copyright © 2017年 Danson. All rights reserved.
  7. //
  8. #import "CoaApplyProtocolCell.h"
  9. #import "CoaApplyProtocolVC.h"
  10. NSString * const XLFormRowDescriptorTypeLeeSureProtocal = @"XLFormRowDescriptorTypeLeeSureProtocal";
  11. @implementation CoaApplyProtocolCell
  12. +(void)load
  13. {
  14. [XLFormViewController.cellClassesForRowDescriptorTypes setObject:NSStringFromClass([CoaApplyProtocolCell class]) forKey:XLFormRowDescriptorTypeLeeSureProtocal];
  15. }
  16. - (void)configure
  17. {
  18. [super configure];
  19. self.selectionStyle = UITableViewCellSelectionStyleNone;
  20. UIImage *img = [[UIImage imageNamed:@"selected_h"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
  21. [_sureBtn setImage:img forState:UIControlStateSelected];
  22. }
  23. - (void)update
  24. {
  25. [super update];
  26. }
  27. - (void)formRowDescriptorValueHasChanged:(XLFormRowDescriptor *)formRow oldValue:(id)oldValue newValue:(id)newValue{
  28. //不知道什么时候掉。外面改??
  29. }
  30. - (IBAction)Readprotocal:(id)sender {
  31. CoaApplyProtocolVC *vc = [[CoaApplyProtocolVC alloc]init];
  32. [self.formViewController navPushHideTabbarToVC:vc];
  33. }
  34. - (IBAction)sureBtn:(id)sender {
  35. _sureBtn.selected = !_sureBtn.isSelected;
  36. self.agree = _sureBtn.selected?@"1":@"0";
  37. self.rowDescriptor.value = self.agree;
  38. }
  39. @end