Firebase crashlytics报告:闭包#number是什么意思?

时间:2019-05-05 04:01:12

标签: ios swift firebase crashlytics

Firebase crashlytics报告:#number闭包是什么意思?

我看到Firebase crashlytics报告:

  

已崩溃:com.apple.main-thread   EXC_BREAKPOINT 0x0000000104a5be14

     

0   iOS   LoginRegisterInputView.swift-第328行   LoginRegisterInputView.initRegisterUI()中的关闭#5

     

1   然后   $ S4ThenAAPAARlzCrlE4thenyxyxKXEKF + 32

     

2   iOS   LoginRegisterInputView.swift-第314行   LoginRegisterInputView.initRegisterUI()

     

3   iOS   LoginRegisterInputView.swift-第225行   LoginRegisterInputView.initUI(style:)

     

4   iOS   LoginRegisterInputView.swift-第42行   专门的LoginRegisterInputView.init(style:rootVC:)

在这种情况下,#5是什么?

我认为这是方法initRegisterUI()

中的第五个闭包

这是相关代码:

func initRegisterUI() {

        self.firstTextfield.keyboardType = .emailAddress
        self.firstTextfield.becomeFirstResponder()
        self.secondTextfield.isSecureTextEntry = true
        self.forgetPwButton.removeFromSuperview()
        self.firstTextfield.rx.controlEvent([.editingDidEnd,.editingChanged]).asObservable()
            .subscribe(onNext: {[weak self] _ in
                guard let strongSelf = self else { return }
                strongSelf.clearButton.isHidden = strongSelf.firstTextfield.text!.count < 1
            }).disposed(by: rx.disposeBag)

        let secureButton =  UIButton().then {
            $0.isSelected = false
            $0.setImage(mImage(name: "login_icon_nosee"), for: .normal)
            $0.setImage(mImage(name: "login_icon_see"), for: .selected)
        }
        self.addSubview(secureButton)
        secureButton.snp.makeConstraints { (make) in
            make.centerY.equalTo((self.secondTextfield)!)
            make.width.equalTo(28)
            make.height.equalTo(24)
            make.right.equalTo(self.clearButton.snp.right)
        }
        secureButton.rx.tap.subscribe(onNext:{ [weak self] in
            guard let strongSelf = self else { return }
            Analysis.shared.push(EVENT_SIGNIN_DISPLAY)
            secureButton.isSelected = !secureButton.isSelected
            strongSelf.secondTextfield.isSecureTextEntry = !secureButton.isSelected
            let text = strongSelf.secondTextfield.text
            strongSelf.secondTextfield.text = nil
            strongSelf.secondTextfield.text = text

        }).disposed(by: rx.disposeBag)
        let registerProtocolLabel = UILabel().then {
            let string = "RegisterIterm".localized().replacingOccurrences(of: "<a>", with: "+").replacingOccurrences(of: "</a>", with: "+")
            let array:[String] = string.components(separatedBy: "+")
            $0.font = mThemeMinFont
            if array.count > 0 {
                $0.attributedText = (array[0].color(mRGBA(120, 120, 120, 1)) + array[1].color(mThemePinkColor).underline + array[2].color(mRGBA(120, 120, 120, 1))).attributedText
            }
            $0.textAlignment = .left
            $0.numberOfLines = 0
            $0.lineBreakMode = .byWordWrapping
            $0.rx.tapGesture().when(.recognized)
                .subscribe(onNext:{ _ in
                 AppUtils.jumpToWebView(route: AppUtils.getFunctionUrl(.term))
                }).disposed(by: rx.disposeBag)
        }
        let registerProtocolAlertLabel = UILabel().then {
            $0.text = "RegisterItermAlert".localized()
            $0.textColor = mThemePinkColor
            $0.font = mThemeMinFont
            $0.isHidden = true
            $0.textAlignment = .left
            $0.numberOfLines = 0
            $0.lineBreakMode = .byWordWrapping
        }
        // ......

相关行:

img code

该代码具有错误性和讨厌性。它不是我写的,不是我同事写的。

现在,我负责这些错误。

通过检查the document of Firebase,它非常简洁,没有细节。

0 个答案:

没有答案