title: Observable for selector - RxSwift
body: <p>I'm trying to migrate my FRP understanding from <strong>ReactiveCocoa 2.5</strong> to <strong>RxSwift</strong> and I have one misunderstanding. In ReactiveCocoa, I used <code>rac_signalForSelector</code> when I wanted to observe an invocation of a method. Is there any way to implement this logic using RxSwift?</p>
  
  <p>I wrote a small example in which I want to dispose a subscription when the <code>test</code> method invokes. But in the subscribe block I can still see a <code>next(6)</code> event. What am I doing wrong?</p>
  
  <pre><code>let subject = PublishSubject&lt;Int&gt;()
  subject.takeUntil(self.rx.sentMessage(#selector(test))).subscribe { event in
      print(event)
  }
  
  subject.onNext(3)
  test()
  subject.onNext(6)
  
  //////////////////
  
  func test() {
  
  }
  </code></pre>