0

I want to bind that debounce thing to my UIButton-star, but there are some issues.

@IBOutlet weak var star: UIButton!

    
    private func starTapRx(){
        print( "rx" )     // this works well

//        star.rx.tap.asDriver().          <- same error here
//             debounce(.seconds(1)).drive(onNext: { (_) in
//                print("presssssss")
//             }).disposed(by: bag)
        
        
        star.rx.tap.bind{ print("bind")}.disposed(by: bag)
    }

this is the error:

image

It occurs on ".rx", and I cannot understand why it is Optional value. I import RxSwift, RxCocoa.

pkamb
  • 30,595
  • 22
  • 143
  • 179
hye
  • 1
  • 2
  • 1
    Does this answer your question? [What does "Fatal error: Unexpectedly found nil while unwrapping an Optional value" mean?](https://stackoverflow.com/questions/32170456/what-does-fatal-error-unexpectedly-found-nil-while-unwrapping-an-optional-valu) – Daniel T. Jul 20 '21 at 20:11

0 Answers0