带有 UITextView 的 UIScrollView 的 Apple TV 默认滚动行为?

Apple TV Default Scrolling behaviour for UIScrollView with a UITextView?

是否可以让 UIScrollView 表现得像在某个网站上看到的普通滚动条 window?意思是不通过关注滚动视图内的不同 UIView 来滚动。我有一个长长的 UITextView,它以可变高度展开,我希望用户可以正常滚动并阅读文本。

但是将 UITextView 添加到 UIScrollView(两者都具有给定的 contentSize)不会给我任何结果。

已实施:

    //::  Scroll View
    scrollView = UIScrollView(frame: CGRect(x: 0, y: 0, width: 1920, height: 1080))
    scrollView.autoresizingMask = [.flexibleHeight]
    scrollView.translatesAutoresizingMaskIntoConstraints = true
    scrollView.backgroundColor = UIColor.red


    scrollView.addSubview(txtView)
    view.addSubview(scrollView)

    //::  Anchor
    txtView.translatesAutoresizingMaskIntoConstraints = false;
    txtView.topAnchor.constraint(equalTo: view.topAnchor, constant: 120).isActive = true
    txtView.centerXAnchor.constraint(equalTo: view.centerXAnchor, constant: 0).isActive = true
    txtView.widthAnchor.constraint(equalToConstant: 825).isActive = true
    txtView.contentSize = CGSize(width: 825, height: 2000)
    txtView.clipsToBounds = false

    scrollView.isScrollEnabled = true
    scrollView.showsVerticalScrollIndicator = true
    scrollView.contentSize = CGSize(width: 1920, height: 2000)

就像删除 UIScrollView 并在 UITextView 上启用滚动一样简单:

txtView.isScrollEnabled = true

很惊讶没有人回答这个问题。