uislider

Multiple jQuery sliders attached to multiple select dropdowns

折月煮酒 提交于 2019-12-25 07:04:02
问题 Hi I am trying to use the following code to attach sliders to my dropdowns. One of them is working but I am having trouble with handling multiple functions for the sliders. Here's what I have -- ` <script> jQuery(function($) { var select = $( ".comment-overall_r select" ); var slider = $( "<div id='slider'></div>" ).insertAfter( select ).slider({ min: 1, max: 6, range: "min", value: select[ 0 ].selectedIndex + 1, slide: function( event, ui ) { select[ 0 ].selectedIndex = ui.value - 1; } }); $

UISlider not holding values in UITableView

与世无争的帅哥 提交于 2019-12-25 06:19:38
问题 For whatever reason.. when I move past it (go down), the slider gets weird and it graphically changes and doesnt retain a value. Notice you can see a shadow of where it was. Any help is greatly appreciated. 回答1: I just found the answer.... All your custom "initWithFrame" code like this: UISlider *theSlider = [[[UISlider alloc] initWithFrame:CGRectMake(55,20,220,45)] autorelease]; theSlider.maximumValue=10; theSlider.minimumValue=0; [cell addSubview:theSlider]; Has to be inside this block, or

UISlider in UIBarButtonItem impacts animation behavior

為{幸葍}努か 提交于 2019-12-24 19:03:09
问题 In IB, I set a view MyView with an UIToolBar and I drop an UISlider on it. IB automatically embeds it in an UIBarButtonItem and sets its view with the UISlider. I display this MyView in a navigation controller with animation. UIViewController *myVC = [[UIViewController alloc] initWithNibName:@"MyView" bundle:nil]; [self.navigationController pushViewController:myVC animated:YES]; [myVC release]; MyView is displayed but without animation. Apart from that, everything works fine, I can use the

Focus on slider after submitting form with slider

情到浓时终转凉″ 提交于 2019-12-24 13:07:04
问题 I am using the jquery ui slider and when the slider is slid, a form is submitted. The code is as follows: <script type="text/javascript"> $(function() { $( "#slider" ).slider({ min: 2000, max: 2008, value:<%=@epoch.start_year %>, slide: function( event, ui ) { $("#slider_value").html(ui.value); $("form#new_epoch").submit(); } }); }); </script> When I move the slider to a different value, the form submits however when the page reloads the focus on the slider is lost. What I am looking to do is

UISlider, setting images for different ranges

孤街浪徒 提交于 2019-12-24 06:37:36
问题 I have a UISlider and I'm basically splitting it into 5 segments. 0 <= x < .2 .2 <= x < .4 .4 <= x < .6 .6 <= x < .8 .8 <= x <= 1 I'm trying to synchronize this with another scrollView that zooms that I have so when I move the slider, the scrollView zooms, AND when I pinch on the scrollView, the slider moves. When I initialize my slider in the viewDidLoad, I created different thumbImages for the UIControlStateNormal and UIControlStateSelected like this: if ([self.navigatorSlider value] >= 0 &

UISlider's editingDidEnd event is not working in iPad

亡梦爱人 提交于 2019-12-24 03:42:49
问题 I want to trigger one method when sliding the UISlider is ended.I used "editingDidEnd"event of UISlider in xib and attached it to a IBAction method but the method is not being called.Can any one please help me how to know when sliding is ended on UISlider? 回答1: UISlider inherits from UIControl so you should be able to add and action on "UIControlEventTouchUpInside" Try something like : [slider addTarget:self action:@selector(sliderTouchUpInsideAction:) forControlEvents

UISlider Update inside UITableViewCell

谁说胖子不能爱 提交于 2019-12-23 13:25:10
问题 I have a custom UITableViewCell that contains a UISlider control and a UILabel which shows the current text value for the slider position. I want to update the label as the slider knob is dragged. Here are the basic elements. cellForRowAtIndexPath: This routine takes data and updates the slider value and the label associated with it. sliderValueChanged: This routine reads the slider value updates the data. It then calls [table reloadData] so the label gets updated. Problem: Somehow the

why UITextView draws text in bad frame after resizing?

醉酒当歌 提交于 2019-12-23 13:06:23
问题 I'm stuck with some kind of magic: when I try to change UITextView frame (in this case with UISlider), text is drawn in some other (smaller) area than frame (resizing multiple times). The funny thing is that if we slide fast enough when trying to make frame bigger, text is drawn in pretty correct area. Can somebody explain why? I tried to layout, autoresize, set content size and bounds, but nothing works. - (void)viewDidLoad { [super viewDidLoad]; _textView = [[UITextView alloc] initWithFrame

Setting tick marks for UISlider

故事扮演 提交于 2019-12-23 12:26:05
问题 Is there any method for setting tick marks for UISlider. NSSlider has something called - (void)setNumberOfTickMarks:(NSInteger)numberOfTickMarks . But UISlider does not appear to have one. What i want to do is get the slider values as 0,1,2,3,4 etc if say i set the min as 0 and max as 5. Now as such UISLider returns something like 0.0,0.1,0.2,0.3 etc 4.8,4.9,5.0 based on the example i gave above. Any help?? 回答1: UISlider doesn't have any tickmarks. To get the behaviour you specify you'll have

ios set start position and incrementation of a UISlider

北城余情 提交于 2019-12-23 12:23:48
问题 Does anyone know how to set the start position of a UISlider (ideally in the middle) and also how to increment it in tens instead of ones? Here's what I've got so far: // Setup custom slider images UIImage *minImage = [UIImage imageNamed:@"ins_blueTrack.png"]; UIImage *maxImage = [UIImage imageNamed:@"ins_whiteTrack.png"]; UIImage *tumbImage= [UIImage imageNamed:@"slide.png"]; minImage=[minImage stretchableImageWithLeftCapWidth:6.0 topCapHeight:0.0]; maxImage=[maxImage