uislider

Slider with real time in Label

試著忘記壹切 提交于 2019-12-04 06:10:18
问题 I need a slider for displaying real time in slider-label from 12-00 AM to 11-45 PM with step size 15 minutes. But I just have no idea how to do it. Сan anybody give some suggestions to me? 回答1: If you just need a time chooser with slider, use the following code in the sliderChanged: handler: - (IBAction)onSliderChange:(id)sender { UISlider *slider = (UISlider *)sender; NSUInteger numberOfSlots = 24*4 - 1; //total number of 15mins slots NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]

Circular UI Slider with Image and Color

纵饮孤独 提交于 2019-12-04 06:03:24
问题 I am working on an app, with UISlider and need to make it circular. Is it possible via some native code, or does a 3rd party library have to be integrated? I want to fill color as user will slider over slider. 回答1: You can find 3rd party libraries for circular slider. Take a look into these: https://www.cocoacontrols.com/controls/uicircularslider https://github.com/thomasfinch/Circular-UISlider https://github.com/milianoo/CurvySlider 回答2: I came across this question in a seperate thread with

Stop UISlider at Value

不羁的心 提交于 2019-12-04 05:25:06
问题 I have a UISlider and I want it to stop at a certain value. This is not the maximum, but a number that is available programmatically. Example: UISlider has max value of 100. The stop value is 60. Therefore, the user shouldn't be able to drag beyond 60. The method I'm using right now is to add an action with a selector function, and there I would change the value back to the stopped position. [mySlider addTarget:self action:@selector(modifySliderValue) forControlEvents

Set UISlider.value to AVPlayer.currentTime

房东的猫 提交于 2019-12-04 05:07:31
I am trying to set a UISlider's Value to a AVPlayer's Current Time. I am trying to use this code audioPlayer.currentTime = nowPlayingSlider.value; I am getting this error: Setter method is needed to assign to object using property assignment syntax How do I get this to work. Here is how I handled this: -(IBAction) timeScrubberChange:(id) sender{ CMTime t = CMTimeMake(self.nowPlayingTimeScrubber.value, 1); self.nowPlayingCurrentTime.text = [self formatTimeCodeAsString: t.value]; self.nowPlayingDuration.text = [self formatTimeCodeAsString:(self.actualDuration - t.value)]; [self.avPlayer

How to add multiple handles to a jQuery slider on the fly

╄→гoц情女王★ 提交于 2019-12-04 04:16:34
问题 I want to do this : Add a handlle to a jQuery slider on some event That handle should have an id so that when it slides, I can access its value. Any ideas how to do this ? Here is the code in JSfiddle where a slider with two handles is implemented. All I need to do is add handles on the fly by some event triggered and get the values each handle for Further utilization. 回答1: I don't see any possibility according to the documentation on http://jqueryui.com/demos/slider/. You could destroy and

iOS - custom image for UISlider

↘锁芯ラ 提交于 2019-12-04 04:09:52
I want to use an image for the UISlider track. I don't want one color on the left of the thumb, and another color on the right. I just want one static image across the whole track. Possible? Midhun MP For setting the image to your slider you can use the setMinimumTrackImage , setMaximumTrackImage methods. For your requirement set both to same image. iOS 5 and Below UIImage *sliderTrackImage = [[UIImage imageNamed: @"Slider.png"] stretchableImageWithLeftCapWidth: 7 topCapHeight: 0]; [mySlider setMinimumTrackImage: sliderTrackImage forState: UIControlStateNormal]; [mySlider setMaximumTrackImage:

Horizantal slider with tick marks on iOS

人盡茶涼 提交于 2019-12-04 03:38:40
问题 Can i realise a horizontal slider with tick marks on iOS? There is not such option like in MacOS. 回答1: I actually wrote a tutorial on how to do this on my company's website: http://fragmentlabs.com/blog/making-talking2trees-part-3-77 The quick answer for this is a custom method I wrote, and which is explained in the article above: -(UIView*)tickMarksViewForSlider:(UISlider*)slider View:(UIView *)view { // set up vars int ticksDivider = (slider.maximumValue > 10) ? 10 : 1; int ticks = (int)

Is there a way to make the jQuery UI slider start with 0 on top instead of on bottom?

若如初见. 提交于 2019-12-04 00:12:59
问题 Look at this demo of the jQuery UI Slider. Notice how when the handle is down the bottom, the value is 0? Is there a way to reverse this, so the handle up the very top is 0, and the handle down the bottom is the max range? I've played a bit with the options, but so far have been unable to get it to work. 回答1: Don't reverse it, take the easy way out :) Just subtract the value from your max, for example: $("#slider-vertical").slider({ orientation: "vertical", range: "min", min: 0, max: 100,

3 interconnected sliders

半腔热情 提交于 2019-12-03 17:05:09
I've been racking my brains over this problem for two days, I've tried different things but none of them work. I'm building an app which is a kind of quizz. There are three subjects which contain questions. I would like to use 3 sliders to define the percentage of questions they want on each subject. ex : slider one = History slider two = Maths slider three = Grammar If I choose to have more history, I slide the history slider up and the other sliders should decrease according to the values they have to reach 100% for the 3 sliders... Any idea for an algorithm ? And what happens when one

Vertical UISlider in iOS with autolayout

扶醉桌前 提交于 2019-12-03 16:52:23
问题 As per my iPad app requirement, i've to show the UISlider vertically. I'm using iOS7 compiler and deployment target is iOS6. In the story board I added horizontal UISlider of width 600 pixels. I created IBOutlet in my view controller. I didn't set any auto layout constraints. I'm using the below code to rotate and make it vertical. self.slider.transform = CGAffineTransformMakeRotation(M_PI_2); After and before rotation I'm printing the frame size of the slider which is correct. But the slider