iphone - UISlider, slide to unlock -
I need to add a UISlider control to my iphone application. It should look like a "slider to unlock" slider that is displayed in any iPhone or iPod touch. I am unable to explain how.
In the slide to unlock the slider, if we leave the thumb image in the center of the slider, it automatically comes back to the left. How do we work on this type of functionality in our project?
You must apply it yourself UISlider Methods First of all, you use the initWithFrame code in the appropriate size Make a slider Then just cut the images you like and you can use them:
setMinimumValueImage: (UIImage *) image; SetMaximumValueImage: (UIImage *) image; SetThumbImage: (UIImage *) State for Image: (UIControlState) Status; SetMinimumTrackImage: (UIImage *) State for Image: (UIControlState) Status; SetMaximumTrackImage: (UIImage *) State for Image: (UIControlState) Status; After that, in the verb method of your slider, check to see if the slider is at maximum value. If not then use setValue: (float) val animated: (BOOL) flag
Most likely using animated = yes I think that you have to stop updating the update or you have to take action on every step, due to which you will always be animate behind. You may have to emphasize some of these but it should work well. You are not receiving the text effect that is apple, but it will come very close by using static images.
Comments
Post a Comment