Search Results

Search found 51 results on 3 pages for 'uislider'.

Page 1/3 | 1 2 3  | Next Page >

  • uiSlider thumb graphic 'flashes' when dragging uiScrollview on 1st gen 3.1.3

    - by Mark Tompson
    I have added my own thumb to a uiSlider and added a 1px x 1px transparent .png to the tracks (I don't want to see the tracks) (I have also tried setting tracks to nil). My uiSlider is also rotated to vertical. The uiSlider sits over a uiScrollView but is not 'attached' to that view. There are numerous uiLabels 'attached' to this uiScrollView, so they all slide about 'beneath' the uiSlider. It all works fine on 3g and iphone 4, but on my 1g itouch (3.1.3) I get a strange flash from the thumb graphic sometimes when scrolling the uiScrollview!? It does seem to happen when the edge of a uiLabel (on the uiScrollView) passes 'under' the thumb graphic? I have tried everything I can think of...

    Read the article

  • iPhone: Activate UISlider and set its value to the location of the current touch programatically

    - by carloe
    Is it possible to set an UISlider as first responder and set its current value to the location of the current touch programatically? The way my app is set up I have a UIView container that takes up the whole screen. Inside the container I have another UIView offscreen at the bottom edge (I'll call this bottomBar). Inside the bottomBar there is a UISlider element. Right now, when the user swipes along the bottom edge of the screen the bottomBar the slider it contains slide up. What I am trying to achieve is to activate the UISlider, and set the position of the slider (the value) to the position of the users touch. Is this possible? Could someone please point me in the right direction?

    Read the article

  • UISlider increments

    - by Stan Note
    Hi all, 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!

    Read the article

  • UISlider to control AVAudioPlayer

    - by David Pollak
    hi everyone, 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

    Read the article

  • Change iPhone UISlider bar image.

    - by Fogmeister
    Hi everyone! My first question on stackoverflow! 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. Thanks Oliver

    Read the article

  • UISlider disappearing when calling setValue with 0

    - by Kai
    I have several UISliders in my application which all work fine until I call the following code: ... frame = CGRectMake(43, 210, 201, 23); mySlider = [[UISlider alloc] initWithFrame:frame]; [mySlider addTarget:self action:@selector(sliderUpdate:) forControlEvents:UIControlEventValueChanged]; mySlider.minimumValue = 0.0; mySlider.maximumValue = 1.0; mySlider.continuous = YES; tempNum = [myArray objectAtIndex:2]; mySlider.value = [tempNum floatValue]; // only breaks if value is 0 [self.view addSubview:mySlider]; ... For some reason the slider doesn't show up unless mySlider.value is set to greater than 0. The only workaround I've found so far is to set it to an extremely small value (such as 0.000000001), which makes the slider appear as expected. Does anyone have any idea why this might be happening and how it can be fixed?

    Read the article

  • UISlider how to set the initial value

    - by slim
    I'm pretty new at this iphone dev stuff and i'm working on some existing code at a company. The uislider i'm trying to set the initial value on is actually in a UITableViewCell and is a custom control. I was thinking in the cell init cell = (QuantitiesCell *)[self loadCellWithNibName:@"QuantitiesCell" forTableView:ltableView withStyle:UITableViewCellStyleDefault]; i could just call something like ((QuantitiesCell *)cell).value = 5; The actual QuantitiesCell class has the member value and the following functions -(void)initCell;{ if (listOfValues == nil) { [self initListOfValues]; } quantitiesSLider.maximumValue = [listOfValues count]-1; quantitiesSLider.minimumValue = 0; quantitiesSLider.value = self.value; } -(void)initListOfValues;{ listOfValues = [[NSMutableArray alloc] initWithCapacity:10]; int j =0; for (float i = minValue; i <= maxValue+increment; i=i+increment) { [listOfValues addObject:[NSNumber numberWithFloat: i]]; if (i == value) { quantitiesSLider.value = j; } j++; } } like i said, i'm pretty new at this so if i need to post more of the code to show whats going to get help, let me know, This slider always is defaulting to 1, the slider ranges usually from 1-10, and i want to set it to a specific value of the item i'm trying to edit.

    Read the article

  • Detect double-tap on UISlider?

    - by Randy
    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 to its default position. I currently have each slider's containing view set to respond to a double-tap, updating each slider. It works fine, but doesn't seem natural. ie.I can't double-tap on the slider itself because the slider intercepts the taps and doesn't pass them on to the surrounding view. thanks in advance

    Read the article

  • UISlider won't display

    - by user290295
    I have been having a lot of difficulty adding custom track images to a UISlider. Whenever I do this, whether to a nib created UISlider or a hand programmed UISlider the slider refuses to display. Also, I even commented the track image code out below and the UISlider still refuses to display. There are other nib created sliders in the controlView that display and function fine. if (![self loadView:keyboardControlView intoSuperview:controlView withNib:@"KeyboardControl"]) { NSLog(@"Could not load controlView from nib into synthControlView"); } // nibSlider is an outlet to a UISlider in the above loaded nib file CGRect sliderFrame = nibSlider.frame; float sliderMinimum = nibSlider.minimumValue; float sliderMaximum = nibSlider.maximumValue; float sliderValue = nibSlider.value; // remove from superview, implicitly releasing UISlider [nibSlider removeFromSuperview]; // reuse pointer to allocate new UISlider using rect obtained from nib nibSlider = [[UISlider alloc] initWithFrame:sliderFrame]; nibSlider.backgroundColor = [UIColor clearColor]; nibSlider.minimumValue = sliderMinimum; nibSlider.maximumValue = sliderMaximum; nibSlider.continuous = YES; nibSlider.value = sliderValue; //[nibSlider setMinimumTrackImage:[[UIImage imageNamed:@"violetslider.png"] //stretchableImageWithLeftCapWidth:5.0 topCapHeight:0.0] forState:UIControlStateNormal]; // //[nibSlider setMaximumTrackImage:[[UIImage imageNamed:@"violetslider.png"] // stretchableImageWithLeftCapWidth:5.0 topCapHeight:0.0] forState:UIControlStateNormal]; [nibSlider addTarget:delegate action:@selector(sliderUpdate:) forControlEvents:UIControlEventValueChanged]; [controlView addSubview:nibSlider]; // do not release here as slider will need to remain cached. push onto a release stack. [nibSlider setNeedsDisplay];

    Read the article

  • iOS - UISlider - How to make a slider to auto-move [closed]

    - by drodri420
    its me again. Coming back with another noobish question: This time its , can you make a UISlider move by itself??? I've implemented this on the .m ///This right here makes a slider move 1point from 1 to 100, once it reaches 100 it goes backwards and so on... - (IBAction)moveSlider:(UISlider *)sender { int flag=0, counter=1; while(flag == 0) { counter = counter + (.25 * round); if(counter == 100) { flag = 1; } if(counter < 100 && counter > 1) { slider.value = counter; } } while(flag == 1) { counter = counter - (.25 * round); if(counter == 1) { flag = 0; } if(counter < 100 && counter > 1) { slider.value = counter; } } } And Implemented this on another action: -(void)startNewRound { round+=1; targetValue = 1 + (arc4random() % 100); self.slider.value = currentValue; [self moveSlider:slider]; } I think I lost it along the way and Im just typing pure nonsense but If anyone could point me in the right direction on to which is it that Im doing wrong??

    Read the article

  • How to make UISlider output nice rounded numbers exponentially?

    - by RickiG
    Hi I am implementing a UISlider a user can manipulate to set a distance. I have never used the CocoaTouch UISlider, but have used other frameworks sliders, usually there is a variable for setting the "step" and other "helper" properties. The documentation for the UISlider deals only with a max and min value, and the output is always a 6 decimal float with a linear relation to the position of the "slider nob". I guess I will have to implement the desired functionality step by step. To the user, the min/max values range from 10 m to 999 Km, I am trying to implement this in an exponential way, that will feel natural to the user. I.e. the user experiences a feeling of control over the values, big or small. Also that the "output" has reasonable values. Values like 10m 200m 2.5km 150 km etc. instead of 1.2342356 m or 108.93837756 km. I would like for the step size to increase by 10m for the first 200m, then maybe by 50m up to 500m, then when passing the 1000 m value, it starts to deal with Kilometers, so then it is step size = 1 km up until 50 km, then maybe 25 km steps etc. Any way I go about this I end up doing a lot of rounding and a lot of calculations wrapped in a forrest of if statements and NSString/Number conversions, each time the user moves the slider just a little. I was hoping someone could lend me a bit of inspiration/math help or make me aware of a more lean approach to solving this problem. My last idea is to populate and array with a 100 string values, then have the slider int value correspond to a string, this is not very flexible, but doable. Thank you in advance for any help given:)

    Read the article

  • How can I control UISlider Value Changed-events frequncy?

    - by Albert
    I'm writing an iPhone app that is using two uisliders to control values that are sent using coreBluetooth. If I move the sliders quickly one value freezes at the receiver, presumably because the Value Changed events trigger so often that the write-commands stack up and eventually get thrown away. How can I make sure the events don't trigger too often? Edit: Here is a clarification of the problem; the bluetooth connection sends commands every 105ms. If the user generates a bunch of events during that time they seem to que up. I would like to throw away any values generated between the connection events and just send one every 105ms. This is basically what I'm doing right now: -(IBAction) sliderChanged:(UISlider *)sender{ static int8_t value = 0; int8_t new_value = (int8_t)sender.value; if ( new_value > value + threshold || new_value < value - threshold ) { value = new_value; [btDevice writeValue:value]; } } What I'm asking is how to implement something like -(IBAction) sliderChanged:(UISlider *)sender{ static int8_t value = 0; if (105msHasPassed) { int8_t new_value = (int8_t)sender.value; if ( new_value > value + threshold || new_value < value - threshold ) { value = new_value; [btDevice writeValue:value]; } } }

    Read the article

  • uiButton should always be as top view in iPhone

    - by suse
    hello, i have a UIView UIImageview UIButton and UISlider added as subview to UIView example: [view addsubview:uiImageview_obj]; [view addsubview:uiButtonview_obj]; [view addsubview:uiSliderview_obj]; When i zoom the uiimageview_obj, it covers uislider and uibutton also, hence i cannot use uislider and uibutton when i zoom the image. So please tell me how to make uislider and uibutton to be always on top? Thank you in advance.

    Read the article

  • iPhone UISlider not visible

    - by John Qualis
    I want to add a UISlider to my app programmatically without using the IB. I am adding a UISlider to my UIViewController using the code below. However I don't see the slider when the view comes up. What am I missing? I am using iPhone SDK 3.1.2. Appreciate any help. @synthesize slider; .... - (void)viewDidLoad { ... ... slider = [[UISlider alloc] initWithFrame: CGRectMake(0, 480 - 80, 300, 20)]; slider.minimumValue = 0.0; slider.maximumValue = 100.0; slider.tag = 0; slider.value = 50; slider.continuous = YES; slider.enabled = YES; [slider addTarget:selfaction:@selector(handleSlider:)forControlEvents:UIControlEventValueChanged]; self.view addSubview:slider]; In the .h file ... UISlider *slider; ... @property (nonatomic, retain) UISlider *slider; - (void) handleSlider:(id)sender;

    Read the article

  • UISlider returns two Touch Up Inside events, why does that happen?

    - by willc2
    I have a slider that I'm using to set a float value somewhere. I connect Value Changed to a method in my viewController. That part works fine. I need to know when the user starts touching the control but not necessarily every single instant that the slider changes (I receive the Value Changed events for that). So I connected a Touch Up Inside event to another method in the viewController. The problem it, that method gets called twice when the user touches the UISlider control. WTF? It doesn't work that way with UIButtons or other touch events like Touch Down. I can work around it, I think, but it seems like a bug in the way the slider control handles touches. Does anybody know why it happens? BTW: the double touch event happens even when Touch Up Inside is the only connected event.

    Read the article

  • Why Is my UISlider Thumb Image Being Shown Multiple Times and Not Disappearing As They Should?

    - by Gorgando
    This slider is possessed: When I move the slider thumb left or right, it leaves the original image there (creating an extra image). This doesn't happen every time and the only consistency i've noticed is that it's inconsistent. When the table is in "Editing mode" it is more likely to create a duplicate thumb image, but it also does so in regular mode. This is the code that I use to create the slider: CGRect frame = CGRectMake(20, 42.0, 280.0, 22); self.slider = [[UISlider alloc] initWithFrame:frame]; [self.slider addTarget:self action:@selector(sliderAction:) forControlEvents:UIControlEventValueChanged]; self.slider.continuous = YES; self.slider.minimumValue = 0.0; self.slider.maximumValue = 5.0; self.slider.value = 0.0; [sliderCell addSubview:self.slider]; Appreciate any thoughts you might have!

    Read the article

  • iPhone UISlider with two thumbs/indicators?

    - by ChrisW
    Is anyone aware of a version of the iPhone UISlider control with two thumbs? I need a control that will allow specifying a range of values. The UISlider API docs would imply this isn't possible with the standard control, so I was wondering if anyone had a solution for this (or had solved it themselves).

    Read the article

  • Custom UISlider Image not responding?

    - by Silent
    Hello all i have a custom image to replace the UISLider defult button image, all works fine image shows, it does not clip off. The problem is when i use the slider to move up and down the image dissapears and some how doesnt show up anymore only sometimes. could someone have a fix?

    Read the article

  • Custom UISlider Image disappearing?

    - by Silent
    Hello all i have a custom image to replace the UISLider defult button image, all works fine image shows, it does not clip off. The problem is when i use the slider to move up and down the image dissapears and some how doesnt show up anymore only sometimes. could someone have a fix? CGRect rect = CGRectMake(16.0, 390.0, 297.0, 35.0); slider.frame = rect; UIImage* thumbImage = [UIImage imageNamed:@"thumb.png"]; [slider setThumbImage:thumbImage forState:UIControlStateNormal]; UIImage* leftImage = [UIImage imageNamed:@"SliderLeft.png"]; [slider setMinimumTrackImage:leftImage forState:UIControlStateNormal]; UIImage* rightImage = [UIImage imageNamed:@"SliderRight.png"]; [slider setMaximumTrackImage:rightImage forState:UIControlStateNormal];

    Read the article

1 2 3  | Next Page >