uislider

Make UISlider height larger?

一世执手 提交于 2020-01-27 10:05:46
问题 I've been searching for a way to make the UISlider progress bar taller, that is, increase the height. However, I haven't had any success. I don't want to use a custom image or anything, just make it taller, so the UISlider doesn't look so thin. Am I missing something super obvious? 回答1: The accepted answer will undesirably change the slider's width in some cases, like if you're using a minimumValueImage and maximumValueImage . If you only want to change the height and leave everything else

AVPlayer SeekToTime not working. Starting from beginning everytime

时光总嘲笑我的痴心妄想 提交于 2020-01-25 17:33:30
问题 I'm having trouble with UISlider and AVPlayer scrubbing method. Every time the method is invoked the player restarts from 0. I tried debugging and seems that the slider value is right but when I Step Over, it's set 0, thus the player restarts. This is what I've tried: var desiredTime = CMTimeMake(Int64(self.progressSlider.value), 1) AudioManager.sharedInstance.audioPlayer.seekToTime(desiredTime) I've also tried looking at similar questions and found that it was the same when I tried their

Change uiview size after rotation transform

白昼怎懂夜的黑 提交于 2020-01-24 19:20:58
问题 My code needs some help from professional xcoders :-) I have a draggable uitextview called "headline" that is a subview in "mainstage". I also added a pinch gesture to change the fontsize inside the uitextview. Everything works fine but the last essential feature that I really need is the rotation of the uitextview. So I added a uislider for rotation and volia! it also works. But after this transformation the uitextview goes crazy* when it becomes a new size via the pinch gesture. (*The

Detect double-tap on UISlider?

╄→尐↘猪︶ㄣ 提交于 2020-01-23 17:51:45
问题 I can detect single/double-taps in specific views with: NSSet *myTouches = [event touchesForView:mySpecificView.view]; but I want to detect a double-tap on the button of a slider and can't find any reference to it. Is there a replacement for "touchesForView:" where I can enter the name of my slider? usage: I have three sliders with their default value being directly in the center of the slider. Once the position of the slider has changed, I want a quick way to individually reset each slider

iOS controlling a slider value and text label value with a stepper

谁说我不能喝 提交于 2020-01-16 18:10:09
问题 I already have a slider that controls the output of a text label. -(IBAction)mySlider:(UISlider *)sender { _myTextLabel.text = [NSString stringWithFormat:@"%i", (int) sender.value]; } However, I also want a stepper to be able to changer the slider's position. So, if the slider has been set to 50, and the text label says 50, I want the stepper to increment to 51, 52, 53, etc. Does anyone know the code to do this? Thanks! 回答1: You will need to keep an reference for the UISlider . Make a handler

UISlider increments

て烟熏妆下的殇ゞ 提交于 2020-01-13 07:14:06
问题 I have a UISlider that slides with a range from 0.0 to 1.0. Out of the box, the slider lets users slide with a really high number of fraction digits, but I only want my users to be able to increment/decrement by .001 for each "tick" up or down of the slider. Is this possible to set up? Thank you! 回答1: How big is this slider? Even if you've got it spanning the full width of the screen in landscape mode, a change of 0.001 is only about half a pixel. It sounds like you just need to round the

AVPlayer currentTime update for a UISlider when ViewController load

此生再无相见时 提交于 2020-01-12 07:24:29
问题 I'm playing songs in AVPlayer . I have created a separate view controller for my media player and initialization, and all the methods that I'm using for the player (play, pause, repeat, shuffle) are there in the same view controller. I update a slider like this: [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(sliderUpdate:) userInfo:nil repeats:YES];` - (void) sliderUpdate:(id) sender{ int currentTime = (int)((song.player.currentTime.value)/song.player.currentTime

AVPlayer currentTime update for a UISlider when ViewController load

为君一笑 提交于 2020-01-12 07:24:08
问题 I'm playing songs in AVPlayer . I have created a separate view controller for my media player and initialization, and all the methods that I'm using for the player (play, pause, repeat, shuffle) are there in the same view controller. I update a slider like this: [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(sliderUpdate:) userInfo:nil repeats:YES];` - (void) sliderUpdate:(id) sender{ int currentTime = (int)((song.player.currentTime.value)/song.player.currentTime

How to store the value of floatSliderGrp in Python Maya

拈花ヽ惹草 提交于 2020-01-11 12:20:20
问题 I have a slider that goes from 1 to 10 and I want to store the value that the user chose with the slider every time. I want the value to get updated with the movement of the slider. This is what I have so far def PrintValue(): print value cmds.floatSliderGrp(label='Angle', field=True, minValue=0.0, maxValue=10.0, value=0 ,dc=PrintValue(PASSVALUE) ) I want to pass the value where the PASSVALUE argument is, is there a way to get the value from the slider? 回答1: 'value' is a flag for the

Customize UISlider (track image height)

你说的曾经没有我的故事 提交于 2020-01-09 10:42:28
问题 I'm customizing a UISlider . I could set a custom thumb image that is higher than the usual thumb however I could not make the track higher when setting a higher minimum track image but the track height remained the same. It should be possible as in the iPod/Music App on the iPad the volume slider is also higher as the usual slider as you can see here: (source: cocoia.com) 回答1: You need to subclass the slider and override the trackRectForBounds: method, like this: - (CGRect)trackRectForBounds