uislider

UISlider thumbTintColor doesn't change on iOS 7 (fine on iOS 6)

ぐ巨炮叔叔 提交于 2019-12-19 05:23:12
问题 I have an app that runs perfectly on iOS 6. I've set a blinking effect to a UISlider's thumb this way: -(void)startBlinkingSlider{ isSliderBlinking = YES; isSliderTinted = NO; [self performSelector:@selector(toggleSliderColor) withObject:nil afterDelay:0.2]; } -(void)toggleSliderColor{ if(isSliderBlinking){ if(isSliderTinted){ self.effectAmountSlider.thumbTintColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:1]; }else{ self.effectAmountSlider.thumbTintColor = [UIColor colorWithRed:255

Increasing a thumbs “click area” in UISlider

纵饮孤独 提交于 2019-12-18 12:54:09
问题 I am creating a custom UISlider and wonder, how do you increase a thumb image's "click area" ? The code below works great, except the thumb's "click area" remains unchanged. If I am not wrong, I believe the standard thumb area is 19 px ? Lets say I would like to increase it to 35px with the following code below, what steps do I need to take? Keep in mind I am not an expert within this area at all. EDIT The code below is corrected and ready for copy pasta! Hope it helps you! main.h #import

JQuery UI Slider for time

£可爱£侵袭症+ 提交于 2019-12-18 10:37:28
问题 Hi I need to implement a slider for 24 hour time range . I like to use jquery ui slider for this . I have written below code <script type="text/javascript"> $(function() { $(".slider-range").slider({ range: true, min: 0, max: 23.59, step: 0.15 }); }); </script> I like the range is like 01:00----01:59 How i gave the colon(:) instead of dot(.) . Also the range waas gone beyond 59 like 05:85 . Please help me to create a time slider 回答1: Do not use hours as a unit, use minutes instead. Then apply

IPhone Range Slider

為{幸葍}努か 提交于 2019-12-18 08:59:07
问题 I know there is a UISlider but does anyone already made RangeSlider ( with two thumbs ?) or knows how to extend the uislider? 回答1: I don't think you can directly extend UISlider, you probably need to extend UIControl. Anyway, this is what I did and created this: http://github.com/doukasd/DoubleSlider Have a look and let me know if you find it useful. You might also want to have a look at my blog post which includes a video showing how it works (to make sure we are talking about the same thing

Setting interval value for UISlider

非 Y 不嫁゛ 提交于 2019-12-18 04:48:15
问题 I need to set the interval value for an UISlider. Please help.. 回答1: yourSlider.value = x; You should really read the documentation, lots of great resources in the iOS Developer Center. Edit: With regards to your more specific question in the comments: yourSlider.minimumValue = -10; yourSlider.maximumValue = 10; [yourSlider addTarget:self action:@selector(roundValue) forControlEvents:UIControlEventValueChanged]; - (void)roundValue{ yourSlider.value = round(yourSlider.value); } 回答2: A flexible

What gets called when a UISlider value changes?

巧了我就是萌 提交于 2019-12-17 22:34:03
问题 Does a method get called when a UISlider 's value changes? I want to be able to update a value based on the UISliders value, but only when it changes... Thanks for any help. 回答1: In IB, you can hook up an IBAction to the Value Changed event or in code add target/action for UIControlEventValueChanged . For example: [mySlider addTarget:self action:@selector(sliderValueChanged:) forControlEvents:UIControlEventValueChanged]; - (IBAction)sliderValueChanged:(UISlider *)sender { NSLog(@"slider value

iPhone:Programming UISlider to position at clicked location

十年热恋 提交于 2019-12-17 18:47:25
问题 How to set the slider to clicked position and get the slider value on the clicked location on UISlider in iPhone programming. i know we can drag the slider to that position but i dont want to do it. Can you please tel me how to set the slider to clicked position? Is this possible to do? 回答1: Here is the part "left as a user exercise": - (void) tapped: (UITapGestureRecognizer*) g { UISlider* s = (UISlider*)g.view; if (s.highlighted) return; // tap on thumb, let slider deal with it CGPoint pt =

UISlider setMaximumTrackTintColor in iOS 7.1

时光毁灭记忆、已成空白 提交于 2019-12-17 18:28:54
问题 [slider setMaximumTrackTintColor: color] has unexpected results in iOS 7.1 (the slider bar changes its position appearing at top instead of vertical center or disappears completely), while working fine with prior versions. [slider setMinimumTrackTintColor: color] does render the expected result. This question might be related: UISlider setMaximumTrackTintColor, but no answer so far. Update: I get this: instead of: Update #2: Using setMaximumTrackImage might work, but the solution I'm looking

UISlider with increments of 5

喜欢而已 提交于 2019-12-17 06:31:35
问题 How do I have my UISlider go from 1-100 in increments of 5 ? 回答1: Add a target like this: slider.continuous = YES; [slider addTarget:self action:@selector(valueChanged:) forControlEvents:UIControlEventValueChanged]; And in the valueChanged function set the value to the closest value that is divisible by 5. [slider setValue:((int)((slider.value + 2.5) / 5) * 5) animated:NO]; So if you need any interval other than 5 simply set it like so: float interval = 5.0f;//set this [slider setValue

about showing continuous slider value in UISlider

一世执手 提交于 2019-12-14 03:39:53
问题 Here's what I want to do with UI Slider .... I have a bunch of files with times and I show them based on slider value. The problem is I want to show the slider value when the user is changing/moving the slider. In other words, the value should change (and be shown on the screen) as the user is moving the slider (and not afterwards). Can anyone please give me any idea how to do it ? Thanks. 回答1: You can ask to get a method called when the slider's value changes. Then using that change, you