Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can we add image or view on slider #11

Open
JyotsnaPiOSDEV opened this issue Apr 5, 2022 · 1 comment
Open

can we add image or view on slider #11

JyotsnaPiOSDEV opened this issue Apr 5, 2022 · 1 comment

Comments

@JyotsnaPiOSDEV
Copy link

I tried to add image then it goes down from slider
internal func setupLayers() {
trackLayer.addSublayer(thumbLayer)
trackLayer.addSublayer(outlineLayer)
let uiview1 = UIView()
let uiview2 = UIView()
uiview1.frame = CGRect(x: 5, y: 0, width: thumbLayer.frame.width - 10 , height: 98)
uiview2.frame = CGRect(x: 5, y: 0, width: 44 , height: 44)
let appLightGrayColor = UIColor(red: 201.0/255.0, green: 201.0/255.0, blue: 201.0/255.0, alpha: 1.0)
uiview1.backgroundColor = appLightGrayColor
uiview1.layer.cornerRadius = 10
// uiview1.addSubview(uiview2)
// uiview2.center = uiview1.center
// uiview2.frame = uiview1.frame
uiview2.center = uiview1.center
uiview2.layer.contents = UIImage(named: "power-signal-white")?.cgImage
uiview2.layer.contentsGravity = CALayerContentsGravity.resizeAspect
// uiview1.center = uiview1.center
// uiview1.addSubview(uiview2)
uiview1.layer.addSublayer(uiview2.layer)
thumbLayer.addSublayer(uiview1.layer)

thumbLayer.addSublayer(thumbOutlineLayer)
    
}
@Ali72
Copy link

Ali72 commented Jul 26, 2023

Check this pull request: #12

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

No branches or pull requests

2 participants