12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- //
- // MTContactsHomeHeaderView.m
- // TheThrees
- //
- // Created by Simon on 2019/9/11.
- // Copyright © 2019 Simon. All rights reserved.
- //
- #import "MTContactsHomeHeaderView.h"
- #import "MTAddFriendViewController.h"
- #import "MTCompanyContactsViewController.h"
- @interface MTContactsHomeHeaderView ()
- @property (weak, nonatomic) IBOutlet UIButton *addBtn;
- @property (weak, nonatomic) IBOutlet UIButton *qunBtn;
- @property (weak, nonatomic) IBOutlet UIButton *heiBtn;
- @property (weak, nonatomic) IBOutlet UIButton *gongsiBtn;
- @end
- @implementation MTContactsHomeHeaderView
- - (instancetype)initWithFrame:(CGRect)frame
- {
- self = [super initWithFrame:frame];
- self = [[[NSBundle mainBundle] loadNibNamed:@"MTContactsHomeHeaderView" owner:self options:nil] lastObject];
- if (self) {
- self.frame = frame;
- [self setupViews];
- }
- return self;
- }
- -(void)setupViews{
- [[self.addBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
- MTAddFriendViewController *vc = [[MTAddFriendViewController alloc]init];
- [CURRENT_NAV pushViewController:vc animated:YES];
- }];
- [[self.qunBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
-
- }];
- [[self.heiBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
-
- }];
- [[self.gongsiBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
- MTCompanyContactsViewController *vc = [[MTCompanyContactsViewController alloc]init];
- [CURRENT_NAV pushViewController:vc animated:YES];
- }];
- }
- -(void)setViewModel:(MTContactsHomeViewModel *)viewModel{
- _viewModel = viewModel;
- }
- @end
|