Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The short answer is you have to make your own.</p> <p>The long answer is that it is possible to customize a UISlider to make it look exactly like the lock slider (this will be cause for rejection, so if you are submitting make it look moderately different even then Apple can be picky about it and may still reject).</p> <p>setup a UISlider with 2 background images, one for when the slider is in the minimum position, and one for when the slider is in the maximum position, and the image for the thumb.</p> <p>Here is a sample setup</p> <pre><code>UIImage *minImage = [UIImage imageNamed:@"sliderback_min.png"]; UIImage *maxImage = [UIImage imageNamed:@"sliderback_max.png"]; UIImage *tumbImage= [UIImage imageNamed:@"slider_thumb.png"]; minImage=[minImage stretchableImageWithLeftCapWidth:25.0 topCapHeight:0.0]; maxImage=[maxImage stretchableImageWithLeftCapWidth:25.0 topCapHeight:0.0]; [lockScreenSlider setMinimumTrackImage:minImage forState:UIControlStateNormal]; [lockScreenSlider setMaximumTrackImage:maxImage forState:UIControlStateNormal]; [lockScreenSlider setThumbImage:tumbImage forState:UIControlStateNormal]; lockScreenSlider.minimumValue = 0.0; lockScreenSlider.maximumValue = 100.0; lockScreenSlider.continuous = YES; lockScreenSlider.value = 10.0; </code></pre> <p>Next use the sliderTouchEnd delegate method to animate the slider falling back to minimum animation when the touch has ended but not fully unlocked. Something like this:</p> <pre><code>- (IBAction) sliderTouchEnd:(id)sender { [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.3]; lockScreenSlider.value = 10.0; [UIView commitAnimations]; } </code></pre> <p>You have to make it yourself, but that will get you a very close proximity of the lock screen slider.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload