alskipp / ASValueTrackingSlider

A UISlider subclass that displays the slider value in a popup view
MIT License
1.84k stars 235 forks source link

Rotating the uislider makes the popupview rotate too #43

Closed Sneakr closed 8 years ago

Sneakr commented 8 years ago

Hi and Thanks for a great addon!

When i use CGAffineTransformMakeRotation(-M_PI * 90 / 180.0f)

on my uislider to make it rotate 90* standing up, the popupvalueview also rotates with the slider, is there anyway to prevent this ?

alskipp commented 8 years ago

The component wasn't designed with this use case in mind. My hacky suggestion is to set the opposite transform on the popUpView in the setUp method in ASValueTrackingSlider.m. If you ensure the transform occurs from the bottom-center of the popUpView, it should have the desired effect.

Sneakr commented 8 years ago

Thanks! I will try it out :+1: