uislider

UISlider accessibility traits for VoiceOver?

[亡魂溺海] 提交于 2019-12-08 01:14:05
问题 What are are the proper UIAccessibility traits and handlers required to make a UISlider usable with VoiceOver enabled? Are there any descriptions of how a user might use a UISlider with VoiceOver enabled? 回答1: Here's what I ended up adding to a UISlider for VoiceOver accessibility: [ mySlider setIsAccessibilityElement:YES ]; [ mySlider setAccessibilityLabel:@"This slider controls blah blah etc...." ]; And in the target method for the control event UIControlEventValueChanged: [ mySlider

How to dynamically update highcharts using jQuery UI sliders

对着背影说爱祢 提交于 2019-12-07 21:45:16
问题 I am looking for a way to dynamically update Highcharts based on the value determined by jQuery UI sliders. I am not well versed yet with AJAX or JSON yet so I haven't had much luck. I am trying to get the revenue to increase incrementally over the given months (like for instance, a subscription service). To make it easier, I have put it on jsFiddle http://jsfiddle.net/nlem33/Sbm2T/3/ . Any help would be much appreciated, thanks! $(function () { var chart; $(document).ready(function() { chart

Custom UISlider: avoid updating when dragging outside

丶灬走出姿态 提交于 2019-12-07 13:28:49
问题 I'm quite new to iPhone development and I'm building my first app :) In one of my view controllers I built a customSlider that should behave as the native "slide to unlock" slider. My doubt right now is how to implement the "drag outside" behaviour. As said, I would like to have it exactly as the native slider, that means that when the finger is dragging the slider if it moves out the slider, the slider should be going to zero. My doubt is not on the animation part (I'm already using

Add UISLider with Autolayout programmatically

萝らか妹 提交于 2019-12-07 11:50:53
问题 I'm trying to add a UISlider to my view programmatically including constraints so that its width adapts to the whole screen width. This is what I got so far: //2 Add UISlider self.slider = [[UISlider alloc] init]; [self.view addSubview:self.slider]; [self.view addConstraint:[NSLayoutConstraint constraintWithItem:self.slider attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeLeft multiplier:1 constant:0]]; [self.view addConstraint:

how to use the UISlider and how to set the slider on a particular values?

旧时模样 提交于 2019-12-07 08:49:09
问题 i am using an UIslider first time. first i want to know how to gat value of slider positon if the range of value is 0 to 10: second i want my slider just set at 5 different values . like 1, 2, 3, 4, 5 slider should not set between the labeled value 回答1: I followed this tutorial for mine and it was very helpful there are variables you can set in the code such as max number and how much the slider increases each time. Link: http://www.xprogress.com/post-35-uislider-tutorial-example-how-to-use

Observing a UISlider's value - iPhone KVO

你说的曾经没有我的故事 提交于 2019-12-07 05:35:47
问题 By default, when I observe the value of a UISlider, it only updates once, when the slider is clicked, not continuously, even thought that is the slider's setting. Is there a way to get the continuous value change of the slider? 回答1: UIKit doesn't actively support KVO. You may be getting lucky in that some notifications may make it through the usual mechanisms, but for the most part you shouldn't assume you can use KVO with any UIKit class. You should instead get your continuous events through

UISlider won't work when it becomes a subview of a UIView other self.view

我怕爱的太早我们不能终老 提交于 2019-12-07 05:04:46
问题 When I add my slider as subview of any view besides self.view it does not work (doesn't slide) but it works fine when it is a subview of self.view. You can see it on the other views besides self.view but it doesn't work. Here is my code: alphaSlider = [[UISlider alloc] initWithFrame:CGRectMake(0, 0, 90, 10)]; [alphaSlider setMinimumValue:0.01]; [alphaSlider setMaximumValue:1]; [alphaSlider setValue:0.5]; [alphaSlider setUserInteractionEnabled:YES]; [alphaSlider addTarget:self action:@selector

Size of default thumb image for iOS slider?

試著忘記壹切 提交于 2019-12-07 01:49:00
问题 What is the exact size (width, height) of the (default) thumb image for the iOS slider? Is there perhaps some clever way to coax this out of the system (XCode, iOS)? I tried int thumbWidth = slider.currentThumbImage.size.width; which I found here on this site, but it comes back with 0. Additional question: The Xcode debugger shows this undocumented variable in the UISlider : CGFloat _hitOffset . Does anyone by chance know what it is and what it's for? 回答1: What about this? Works for me:

I need a UISlider with value on the handle [closed]

删除回忆录丶 提交于 2019-12-06 16:28:19
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I need to make a UISlider in my iOS App with the value of the slider in the handle. Demo image of what I mean: Is there a pod that could do it? 回答1: You dont need neither any third party control nor you will have to create a slider on your own. You can still use the UISlider and customise it as per your need :)

UISlider Handle Changes Width on Different Size iPads

梦想的初衷 提交于 2019-12-06 15:48:38
I have a vertical slider which uses the following code to generate a handle image within its custom class: func generateHandleImage(with color: UIColor) -> UIImage { let rect = CGRect(x: 0, y: 0, width: (superview?.bounds.size.height)! * 0.07, height: (superview?.bounds.size.width)!) return UIGraphicsImageRenderer(size: rect.size).image { (imageContext) in imageContext.cgContext.setFillColor(color.cgColor) imageContext.cgContext.fill(rect.insetBy(dx: 0, dy: 0)) } } I have set the autolayout constraints in IB for the slider for it to be centered in the x & y axes of it's superview and equal