scroll view indicator fix for defect: CXTDT-82115
This commit is contained in:
parent
61bf3d14fe
commit
101e1422f3
@ -50,6 +50,14 @@ open class ScrollingViewController: ViewController {
|
|||||||
dismissKeyboardTapGesture?.isEnabled = false
|
dismissKeyboardTapGesture?.isEnabled = false
|
||||||
scrollView.alwaysBounceVertical = false
|
scrollView.alwaysBounceVertical = false
|
||||||
scrollView.delegate = self
|
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() {
|
open override func viewDidLayoutSubviews() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user