how to use swiftReactive watching an method with some param when it use?

60 Views Asked by At

sorry my English not verywell,in swift i want to use SwiftReactive do something ,like in ObjectC the RAC work,like:

[[a rac_signalForSelector:@selector(xxxx)] subscribeNext:^(id x) {

}];

and in swift i learnd use :

a.reactive.trigger(for: #selector(a.shareWithConfiguration(type:))).observeValues { () in

    }

but i cannot get the param in this method ,yeah it's that named"type",try to write like this:

a.reactive.trigger(for: #selector(a.shareWithConfiguration(type:))).observeValues { (type) in

    }

but it did't work
please help me ,just show me how to get this named "type" value

1

There are 1 best solutions below

0
user10477229 On

it's done buddy. i have already fix it,reason is didn't write @objc dynamic before that method