In ios1,how to modify the code so the slider doesn't reset the halfway but start from the same position in each round?

It is quite simple, you can set the value of the Slider to whatever the value it had last.

AND you the halfway reset is because of setting the currentValue to 50 and then setting the slider to that value.

I am not sure where this reference is from, but this should be good for you to start.