uislider

Set UISlider.value to AVPlayer.currentTime

拜拜、爱过 提交于 2020-01-01 09:31:55
问题 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. 回答1: 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

Custom MPVolumeView Thumb Image not vertically centered since iOS 5.1

会有一股神秘感。 提交于 2020-01-01 09:18:14
问题 I'm building an application that needs an MPVolumeView to control the volume. It worked perfectly before iOS 5.1 but since the 5.1 update the thumb image is no longer vertically centered. I tried a few things like changing imagine dimensions, resizing my views (and slider) but nothing seems to work, the thumb is just not vertically centered anymore. The only way i get a centered thumb is if i use the default iOS one. I tried adding a UISlider to another view with the exact min, max and thumb

3 interconnected sliders

故事扮演 提交于 2020-01-01 06:42:31
问题 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

UIslider buttons doesn't work with checkbox filter

无人久伴 提交于 2019-12-31 07:32:49
问题 I try to figure out how to force slider's buttons to move it instead of normal sliding, but keeping the checkbox filter still working by proper way. When I set buttons to move slider then filter doesn't work the way it should. The problem is coming out when i change slider code from: values: [10000], to: value: 10000. Here's my code and jsfiddle example with properly working filter and not working buttons (only slider + checkbox filtering works in that example to show how I need to filter

iOS Custom Slider remove min and max space from both ends

对着背影说爱祢 提交于 2019-12-31 05:41:11
问题 I'm trying to make custom slider using class MySlider: UISlider { override func trackRect(forBounds bounds: CGRect) -> CGRect { let customBounds = CGRect(origin: bounds.origin, size: CGSize(width: bounds.size.width, height: 5.0)) super.trackRect(forBounds: customBounds) return customBounds } } Updated thumb/max/min tint colour from storyboard The problem is need to remove min and max space from both ends as shown in pics. How i can do that? 回答1: I was able to achieve this without subclassing:

UISlider how to set the initial value

橙三吉。 提交于 2019-12-31 04:41:07
问题 I'm pretty new at this iphone dev stuff and i'm working on some existing code at a company. The uislider i'm trying to set the initial value on is actually in a UITableViewCell and is a custom control. I was thinking in the cell init cell = (QuantitiesCell *)[self loadCellWithNibName:@"QuantitiesCell" forTableView:ltableView withStyle:UITableViewCellStyleDefault]; i could just call something like ((QuantitiesCell *)cell).value = 5; The actual QuantitiesCell class has the member value and the

Custom Range/Variable Set with jQuery UI Slider

放肆的年华 提交于 2019-12-30 04:00:10
问题 I wanted to see if I could make a custom data set to use with jQuery UI Slider. I'm working on a site that has dress sizes that come in the range of: [ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 16W, 18W, 20W ] The issue I'm having arises right after 18, when it jumps to "wide" sizes that are a bit unique. Before I added in the 16W, 18W, and on sizes, I created a working slider using the following code: $("#slider-size .slider").slider({ min: 0, max: 18, step: 2, slide: function(event, ui) { $("

UISlider behaviour in iOS7 versus iOS6

孤人 提交于 2019-12-30 01:08:09
问题 I noticed that UISlider in iOS7 behaves differently than it did in iOS 6 and iOS 5: Say you have a slider with min=0 and max=10, current value is 0. When you first touch the "knob", a valueChanged message is sent with slider.value=0.269 (instead of the expected 0) and the knob moves towards the middle. Generally, touching the slider moves it towards the middle value (5 in this example), the farther out from the middle it currently is, the more it moves. All this did not happen in iOS6, and I

UISlider with ProgressView combined

时光毁灭记忆、已成空白 提交于 2019-12-27 18:24:24
问题 Is there an apple-house-made way to get a UISlider with a ProgressView. This is used by many streaming applications e.g. native quicktimeplayer or youtube. (Just to be sure: i'm only in the visualization interested) cheers Simon 回答1: Here's a simple version of what you're describing. It is "simple" in the sense that I didn't bother trying to add the shading and other subtleties. But it's easy to construct and you can tweak it to draw in a more subtle way if you like. For example, you could

UISlider with ProgressView combined

时光总嘲笑我的痴心妄想 提交于 2019-12-27 18:23:53
问题 Is there an apple-house-made way to get a UISlider with a ProgressView. This is used by many streaming applications e.g. native quicktimeplayer or youtube. (Just to be sure: i'm only in the visualization interested) cheers Simon 回答1: Here's a simple version of what you're describing. It is "simple" in the sense that I didn't bother trying to add the shading and other subtleties. But it's easy to construct and you can tweak it to draw in a more subtle way if you like. For example, you could