uislider

Troubles with starting value using UISlider

北慕城南 提交于 2021-02-16 20:24:26
问题 Started working on the application. There was the following problem, in Main.storyboard the current value is set for the slider (for the top one it is 1.5 out of 3, and for the bottom one it is 100 out of 200), therefore, in the screenshot, I should have points on the slider track in the middle. I started googling about it, I can't find anything. Xcode 12 problem maybe? If not, please help me write the correct search query. I will be very grateful. Sorry for my bad English. :) Here

Swift: UISlider one side of track not rounded

落爺英雄遲暮 提交于 2021-02-11 09:39:26
问题 I have a custom UISlider, but there is a side of the slider which is not rounded Here my custom view: class PrimarySliderView: UISlider { override init(frame: CGRect) { super.init(frame: frame) setup() } required init?(coder: NSCoder) { super.init(coder: coder) setup() } override func trackRect(forBounds bounds: CGRect) -> CGRect { return CGRect(origin: bounds.origin, size: CGSize(width: bounds.width, height: 6)) } func setup() { tintColor = .cornFlowerBlue } How to round the right side also?

How to set a Mixer's volume to a slider's volume in Unity?

蓝咒 提交于 2020-12-31 06:49:38
问题 I'm trying to make some audio settings. Here is my script: public AudioMixer masterMixer; public float masterLvl; public float musicLvl; public float sfxLvl; public void SetMasterVolume () { masterLvl = masterVolumeSlider.value; masterMixer.SetFloat("masterVol", masterLvl); } public void SetMusicVolume() { musicLvl = musicVolumeSlider.value; masterMixer.SetFloat("musicVol", musicLvl); } public void SetSfxVolume() { sfxLvl = sfxVolumeSlider.value; masterMixer.SetFloat("sfxVol", sfxLvl); } It

How to set a Mixer's volume to a slider's volume in Unity?

那年仲夏 提交于 2020-12-31 06:48:20
问题 I'm trying to make some audio settings. Here is my script: public AudioMixer masterMixer; public float masterLvl; public float musicLvl; public float sfxLvl; public void SetMasterVolume () { masterLvl = masterVolumeSlider.value; masterMixer.SetFloat("masterVol", masterLvl); } public void SetMusicVolume() { musicLvl = musicVolumeSlider.value; masterMixer.SetFloat("musicVol", musicLvl); } public void SetSfxVolume() { sfxLvl = sfxVolumeSlider.value; masterMixer.SetFloat("sfxVol", sfxLvl); } It

Swift Using a UISlider in a UITableViewCell the right way?

雨燕双飞 提交于 2020-11-29 03:55:30
问题 I am struggling to properly use UISliders in a UITableViewCell. Here is the Idea: The User can set different Jobs which he needs to fulfil tasks. The amount of different Jobs cannot be known in advance. Lets say for example User1 needs for his Band only Guitarists and Drummers, where someone else needs Guitarists, Drummers, Singers, Keyboarders and so on. What I want him to provide is that depending on which Jobs he needs, he can set the amount of people he needs for a specific job. I am

Swipe gesture interrupts UISlider control in iOS 13, but not previous iOS versions

天涯浪子 提交于 2020-08-07 06:32:59
问题 Note: This is the iOS 13 beta, but also could apply to the official release tomorrow. Update 2: I replaced it with a larger thumb image, and I'm still having a problem. Update: It looks like it still controls continuously if I'm super precise about touching the thumb on the slider. But why is this changed, and how can I make it control like before? I have a swipe gesture recognizer added to my view: let swipeRight = UISwipeGestureRecognizer(target: self, action: #selector(self

Swipe gesture interrupts UISlider control in iOS 13, but not previous iOS versions

拥有回忆 提交于 2020-08-07 06:32:47
问题 Note: This is the iOS 13 beta, but also could apply to the official release tomorrow. Update 2: I replaced it with a larger thumb image, and I'm still having a problem. Update: It looks like it still controls continuously if I'm super precise about touching the thumb on the slider. But why is this changed, and how can I make it control like before? I have a swipe gesture recognizer added to my view: let swipeRight = UISwipeGestureRecognizer(target: self, action: #selector(self

Moving slider getting jumpy while playing Avplayer in iOS

本秂侑毒 提交于 2020-07-20 05:45:26
问题 I am playing mp3 urls in Avplayer. It is working fine, and I am showing Slider for progress of the audio player. While trying to moving forward slider, It is getting jumpy. But audio seeking is working fine. Only slider UI getting jumpy. My code is /* ---------------------------------------------------- Player setup ------------------------------------------------------ */ func playerSetup(url:String) { do { let audioURL = url avPlayerItem = AVPlayerItem( url:NSURL( string:audioURL )! as URL