12345678910111213141516171819202122232425262728293031323334 |
- //
- // RQPhoneView.m
- // YueXueChe
- //
- // Created by 张嵘 on 2018/12/14.
- // Copyright © 2018 lee. All rights reserved.
- //
- #import "RQPhoneView.h"
- @interface RQPhoneView ()
- @property (weak, nonatomic) IBOutlet NSLayoutConstraint *iconImageViewToSelf;
- @end
- @implementation RQPhoneView
- + (instancetype)loginCodeView {
- return [super rq_viewFromXib];
- }
- - (void)awakeFromNib {
- [super awakeFromNib];
- @weakify(self)
- self.iconImageViewToSelf.constant = 6.f;
- [[[RACSignal merge:@[RACObserve(self.loginCodeTextField, text), self.loginCodeTextField.rac_textSignal]] skip:0] subscribeNext:^(NSString *text) {
- @strongify(self)
- if ([text containsString:@"-"]) {
- self.loginCodeTextField.text = [text stringByReplacingOccurrencesOfString:@"-" withString:@""];
- }
- }];
- }
- @end
|