warchimede / RangeSlider

A simple range slider made in Swift
MIT License
366 stars 78 forks source link

Swift 3 support #21

Closed nalogowiec closed 7 years ago

nalogowiec commented 7 years ago

Hey, great work with the slider! I used it without any problems with Swift 2.2, but then I migrated to Swift 3 and now I have some small problems, it does not compile because of those lines:

override func layoutSublayersOfLayer(_ layer: CALayer) { super.layoutSublayersOfLayer(layer) updateLayerFrames() }

the error states this function does not override anything in the superclass...

Sundin commented 7 years ago

Try changing it to:

override func layoutSublayers(of layer: CALayer) { super.layoutSublayers(of: layer) updateLayerFrames() }

The reason is that this function has been renamed in Swift 3.

nalogowiec commented 7 years ago

Thank you man for a quick solution and a great answer, it of course works :)