Skip to content
This repository has been archived by the owner on Dec 29, 2020. It is now read-only.

Setting color manually will not change the position of previewView #35

Open
minseks opened this issue Jun 28, 2019 · 6 comments
Open

Setting color manually will not change the position of previewView #35

minseks opened this issue Jun 28, 2019 · 6 comments

Comments

@minseks
Copy link

minseks commented Jun 28, 2019

I'm on the horizontal mode.

@juangz
Copy link

juangz commented Aug 6, 2019

Hello! I'm facing the same issue. Did you manage to solve it?

@maysamsh
Copy link

maysamsh commented Sep 27, 2019

try this:

slider.color = some_color
let x = slider.gradientView.calculateSliderProgress(for: slider.internalColor)
slider.previewView?.transition(to: .active)
slider.centerPreview(at: CGPoint(x: x * slider.bounds.width, y: x * slider.bounds.height))

@LucaComanducci
Copy link

Hi, we can't do this because "calculateSliderProgress" and "centerPreview" are inaccessible due to 'internal' protection level

@maysamsh
Copy link

How to do this then?

@suprb
Copy link

suprb commented Dec 20, 2019

I wonder this as well...

@Jarred-Sumner
Copy link

I will just fork this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants