所以:
cell.textView.rac_signalForSelector("becomeFirstResponder")
.takeUntil(cell.rac_prepareForReuseSignal)
.flattenMap { (x) -> RACStream! in
return NSNotificationCenter.defaultCenter().rac_addObserverForName(UIKeyboardDidShowNotification, object: nil)
}
.subscribeNext { [weak self](notify) -> Void in
__logln("be4")
}
但是当我点击cell.textView时,“be4”输出了4次
然后,当我离开pop的viewcontroller并推回时,
然后再次单击cell.textView,输出为8次
答案 0 :(得分:0)
我得到了答案,那是因为SoGou输入法,它发送三次UIKeyboardDidShowNotification通知 ....