美文网首页
tvOS UIScrollView的滚动

tvOS UIScrollView的滚动

作者: HCong | 来源:发表于2018-09-28 15:21 被阅读15次

tvOSUIScrollView的滚动跟iOS差别很大,UIScrollViewUITextView添加后并不能够进行滚动,需要进行一下设置:

textV.isUserInteractionEnabled = true
textV.panGestureRecognizer.allowedTouchTypes = [NSNumber(value: UITouch.TouchType.indirect.rawValue)]
        
scrollV.isUserInteractionEnabled = true
scrollV.contentSize = CGSize(width: UIScreen.main.bounds.width, height: 10000)
scrollV.panGestureRecognizer.allowedTouchTypes = [NSNumber(value: UITouch.TouchType.indirect.rawValue)]

相关文章

网友评论

      本文标题:tvOS UIScrollView的滚动

      本文链接:https://www.haomeiwen.com/subject/lslpoftx.html