我可以在 swift 3 中使用 ReactiveCocoa 吗?

Can i use ReactiveCocoa in swift 3?

我必须在以下代码中使用 Reactive Cocoa 或 RxSwift 来实现动态标签高度和动态行高。

我可以在 Swift3 中使用 Reactive Cocoa 吗? ReactiveCocoa 和 RxSwift 有什么区别?

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    let cell: BTSTableViewCell = self.tableView.dequeueReusableCell(withIdentifier: "BTSTableViewCellIdentifier")! as! BTSTableViewCell

    cell.configureWithPost(posts[indexPath.row])
    cell.delegate = self
    return cell

}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {

    // 259.5+ labelHeight+ bigImageHeight

    let postViewModel = posts[indexPath.row]

    //caption height
    var captionHeight = postViewModel.textDetail?.height(withConstrainedWidth: tableView.bounds.size.width - 20, font: UIFont.systemFont(ofSize: 17))

    captionHeight = ceil(captionHeight!)

    var finalCaptionHeight: CGFloat = 0.0;

    if postViewModel.showDetailedCaption {
        finalCaptionHeight = captionHeight!
    }
    else {
        finalCaptionHeight = min(41, captionHeight!)
    }
    return 259.5 + postViewModel.getBigImageHeightFor(tableView.bounds.size.width) + finalCaptionHeight

}

Can I use Reactive Cocoa in Swift3?

是的,你可以。该项目是 located here. It's important to note that ReactiveCocoa will only have the UI bindings, while the actual "engine" is called ReactiveSwift.

And What is the difference between ReactiveCocoa and RxSwift?

你可以找一个比较here。但归根结底,两者都是两个非常强大的框架。无论你选择哪一个,你都不会错。