Commit dcce4b4b authored by David黄金龙's avatar David黄金龙

我的信息 预览界面 优化滚动流程

parent 85123e4a
......@@ -37,6 +37,14 @@ class YHPreviewBaseViewController: YHBaseViewController {
make.left.equalTo(16)
make.right.equalTo(-16)
}
NotificationCenter.default.addObserver(self, selector: #selector(beginDragging), name:Notification.Name(rawValue: "scrollViewWillBeginDragging0"), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(endDragging), name:Notification.Name(rawValue: "scrollViewDidEndDragging0"), object: nil)
}
}
......@@ -101,3 +109,16 @@ extension YHPreviewBaseViewController: UIScrollViewDelegate {
}
}
}
extension YHPreviewBaseViewController {
@objc func beginDragging() {
homeTableView.isScrollEnabled = false
vcCanScroll = false
}
@objc func endDragging() {
homeTableView.isScrollEnabled = true
// vcCanScroll = true
}
}
......@@ -30,7 +30,6 @@ class YHPreviewControllerHoldViewController: UIViewController {
var segmentedView : JXSegmentedView = JXSegmentedView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 55))
lazy var segmentedDataSource: JXSegmentedBaseDataSource = {
let dataSource = JXSegmentedTitleDataSource()
// dataSource.isTitleColorGradientEnabled = true
dataSource.titles = arrItemTitles
dataSource.titleNormalFont = UIFont.PFSC_R(ofSize: 16)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment