uislider

Customize UISlider (track image height)

99封情书 提交于 2020-01-09 10:39:27
问题 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

How to create a custom UISlider

人走茶凉 提交于 2020-01-07 08:10:11
问题 Hi How can i create a custom UISlider like the image below. I googled a lot still couldn't able to find a way to do that. Can anybody suggest me how to achieve this. Any help would be greatly appreciated. 回答1: Custom UISlider ViewController.h #import <UIKit/UIKit.h> @interface ViewController :UIViewController { } @property (strong, nonatomic) IBOutlet UILabel *LineLbl; @property (strong, nonatomic) IBOutlet UIScrollView *scrollviewObj; @end ViewController.m #import "ViewController.h"

Why doesn't setting the value property of this UISlider update its position?

故事扮演 提交于 2020-01-07 04:44:30
问题 ...ViewController.h: @property (nonatomic, strong) IBOutlet UISlider *slider; ...ViewController.m: @synthesize slider; - (void)viewDidLoad { [super viewDidLoad]; ... currentValue = 50; self.slider.value = currentValue; // Do any additional setup after loading the view, typically from a nib. } .xib: The UISlider in my interface is connected to the slider property. Behavior: The slider sits all the way to the right at value 100 when it is supposed to be in the middle. An action I set up

Retrieve and change the point at which touchUpInside changes to touchUpOutside

末鹿安然 提交于 2020-01-05 20:21:05
问题 I have made a UISlider work just like the "slide to unlock" slider. What I need to do is determine the point at which lifting your finger off is classed as touchUpOUTSIDE and not touchUpINSIDE . This is the point where you slide your finger past the end of the slider too far. I guess it's the same as with a UIButton , you can press the button then slide your finger off the button and depending how far you go, it can still be classed as touchUpInside . If possible, i'd like to mark the target

Jquery slide animation

怎甘沉沦 提交于 2020-01-05 05:43:07
问题 Good day! I am trying to hide and show divs with slide animation. My code is as follows: <style> div.bigBox { background-color:white; width:100px; height:125px; overflow:hidden; } div.try{ background-color:green; width:100px; height:125px; float: left; } div.try2{ background-color:yellow; width:100px; height:125px; } } </style> <script language="JavaScript" src="js/jquery-1.6.1.js"></script> <script src="http://ui.jquery.com/latest/ui/jquery.effects.core.js"></script> <script src="http://ui

UISlider track height

≡放荡痞女 提交于 2020-01-04 09:36:40
问题 I have implemented UISlider and I need to adjust track height. I found this but its not working. self.slider.trackRect(forBounds: CGRect(x: 0, y: 0, width: 100, height: 100)) 回答1: found this but its not working Because you're using it wrong. You don't call it. You subclass, and override it. However, the right approach is to supply new images for the track, with setMinimumTrackImage and setMaximumTrackImage . 回答2: Ok...I used matt's answer + provided example and I customized the code for my

UISlider not animating in iOS7

大城市里の小女人 提交于 2020-01-03 06:44:09
问题 When I switched from iOS 6 to iOS 7 design, I noticed that using the method setValue:animated: no longer animates the sliding process. Has anyone else came across this problem and found a solution? I'll just add some code to show I've done nothing complicated: //Variable declaration IBOutlet UISlider *s; //Connected in the .xib //Button pressed - (IBAction)buttonPressed:(id)sender { [s setValue:1 animated:YES]; } And it jumps straight to 1 after I press the button. 回答1: Backwards compatible

UISlider inside UIPageViewController

做~自己de王妃 提交于 2020-01-02 00:56:09
问题 I have a PageViewController which is initialized like this: self.pageViewController = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStyleScroll navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal options:nil]; On one of the pages, there's a UISlider. My problem is that when I have transitionstyle set to UIPageViewControllerTransitionStyleScroll , it takes 150-200 ms before beginTrackingWithTouch is invoked on the slider. This

Clickable UISlider

廉价感情. 提交于 2020-01-01 19:15:46
问题 I'd like to make my UISlider clickable - to change the value on click to "blank space", e.g. It's set to zero, I click in the middle of the slider and it will "jump" to the middle. Is there any way how to do this? 回答1: I want to propose something similar as jrtc27, but without subclassing: add a UI(Tap)GestureRecognizer to the slider. UISlider *slider = [[[UISlider alloc] init] autorelease]; //configure slider UITapGestureRecognizer *tapGestureRecognizer = [[[UITapGestureRecognizer alloc]

Clickable UISlider

巧了我就是萌 提交于 2020-01-01 19:15:00
问题 I'd like to make my UISlider clickable - to change the value on click to "blank space", e.g. It's set to zero, I click in the middle of the slider and it will "jump" to the middle. Is there any way how to do this? 回答1: I want to propose something similar as jrtc27, but without subclassing: add a UI(Tap)GestureRecognizer to the slider. UISlider *slider = [[[UISlider alloc] init] autorelease]; //configure slider UITapGestureRecognizer *tapGestureRecognizer = [[[UITapGestureRecognizer alloc]