uislider

Gesture problem: UISwipeGestureRecognizer + UISlider

坚强是说给别人听的谎言 提交于 2019-11-26 15:47:06
问题 Got a gesture related problem. I implemented UISwipeGestureRecognizer to get swipe left and right events and that is working fine. However the problem I'm facing is that the UISlider's I have in the same view are not playing nice. The sliding motion of the sliders is being mistaken as a swipe left/right. Any one experienced this problem before, got any ideas how to correct it? Many thanks. Here is the code contained within the view controller: - (void)viewDidLoad { [super viewDidLoad]; /

UISlider to control AVAudioPlayer

十年热恋 提交于 2019-11-26 12:58:49
问题 I\'m trying to implement a little function in my app. I am currently playing sounds as AVAudioPlayers and that works fine. What I would like to add is to control the sound\'s position (currentTime) with an UISlider: is there a simple way to do it ? I looked at an Apple project but it was quite messy....have you got samples or suggestions ? Thanks to everyone in advance 回答1: To extend on paull's answer, you'd set the slider to be continuous with a maximum value of your audio player's duration

How to get the center of the thumb image of UISlider

有些话、适合烂在心里 提交于 2019-11-26 10:28:22
问题 I\'m creating a custom UISlider to test out some interface ideas. Mostly based around making the thumb image larger. I found out how to do that, like so: UIImage *thumb = [UIImage imageNamed:@\"newThumbImage_64px.png\"]; [self.slider setThumbImage:thumb forState:UIControlStateNormal]; [self.slider setThumbImage:thumb forState:UIControlStateHighlighted]; [thumb release]; To calculate a related value I need to know where the center point of the thumb image falls when it\'s being manipulated.

Change iPhone UISlider bar image

吃可爱长大的小学妹 提交于 2019-11-26 08:12:51
问题 I\'m using a UISlider in my app but I\'d like to use a custom \"look-and-feel\" for it. I have changed the thumb to my own image but is there a way to change the bar also? I have a bar image I would like to use but can\'t see how to do this. I have found how to change the max and min image but not the bar itself. 回答1: You were right to use -setMinimumTrackImage:forState: and -setMaximumTrackImage:forState: methods. What you missed is that you should provide stretchable UIImage to them, the

Slide a layout up from bottom of screen

人走茶凉 提交于 2019-11-26 06:13:35
问题 I have a layout hidden from the view. On a button click I want it to slide up from the bottom pushing the entire screen contents upwards, very similar to how whatsapp shows emoticons panel in chat screen. I have seen SlidingDrawer, that dosen\'t work for me. It requires an image as an handle which is shown at the center of the screen, I don\'t want that. It also slides over the existing screen content, I am looking for a way to move the existing content upwards. Update 1: I tried using the