MTAddFriendNoView.m 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // MTAddFriendHeaderView.m
  3. // TheThrees
  4. //
  5. // Created by Simon on 2019/9/11.
  6. // Copyright © 2019 Simon. All rights reserved.
  7. //
  8. #import "MTAddFriendNoView.h"
  9. #import "MTCompanyContactsViewController.h"
  10. @interface MTAddFriendNoView ()
  11. @property (weak, nonatomic) IBOutlet UIButton *qunBtn;
  12. @property (weak, nonatomic) IBOutlet UIButton *saoBtn;
  13. @property (weak, nonatomic) IBOutlet UIButton *gongsiBtn;
  14. @property (weak, nonatomic) IBOutlet UIButton *phoneBtn;
  15. @end
  16. @implementation MTAddFriendNoView
  17. - (instancetype)initWithFrame:(CGRect)frame
  18. {
  19. self = [super initWithFrame:frame];
  20. self = [[[NSBundle mainBundle] loadNibNamed:@"MTAddFriendNoView" owner:self options:nil] lastObject];
  21. if (self) {
  22. self.frame = frame;
  23. [self setupViews];
  24. }
  25. return self;
  26. }
  27. -(void)setupViews{
  28. [[self.qunBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
  29. }];
  30. [[self.saoBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
  31. }];
  32. [[self.gongsiBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
  33. MTCompanyContactsViewController *vc = [[MTCompanyContactsViewController alloc]init];
  34. [CURRENT_NAV pushViewController:vc animated:YES];
  35. }];
  36. [[self.phoneBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
  37. }];
  38. }
  39. -(void)setViewModel:(MTAddFriendViewModel *)viewModel{
  40. _viewModel = viewModel;
  41. }
  42. @end