scroll view indicator fix for defect: CXTDT-82115

This commit is contained in:
Khan, Arshad 2020-10-08 21:01:55 +05:30
parent 61bf3d14fe
commit 101e1422f3

View File

@ -50,6 +50,14 @@ open class ScrollingViewController: ViewController {
dismissKeyboardTapGesture?.isEnabled = false
scrollView.alwaysBounceVertical = false
scrollView.delegate = self
// will change scrollView indicatorStyle automatically on the basis of backgroundColor
var componentWhite:CGFloat = 0
var componentAlpha:CGFloat = 0
if let grayScale = view.backgroundColor?.getWhite(&componentWhite, alpha: &componentAlpha), grayScale
{
scrollView.indicatorStyle = componentWhite > 0 ? .black : .white
}
scrollView.flashScrollIndicators()
}
open override func viewDidLayoutSubviews() {