How to make custom slider to use pagination for book in iphone?
I have to make custom slider to view desired page in the book in iphone.
It should be like continious slider, if i slide it to view any page(i.e 90th page of 500 pages)..i can view that p开发者_如何学JAVAage using custom slider.... and can move at any other desired page out of 500 pages.
For reference, I have seen iBook application of Iphone and Ipad, where such functionality is present.
please help me out using any useful link or code snippet.....It would be nice help for custom slider approach..
Thanks, Mishal Shah
I think your best bet is to create a slider using an object such as a UIImageView
and to control the movement of that object and the text object in the background with touches.
More reading can be found here.
Essentially you want to work with:
- touchesBegan:withEvent:
- touchesMoved:withEvent:
- touchesEnded:withEvent:
Using these you can create an x
and y
integer showing whether the user has touch a particular part of the screen, you can then program to respond to this such as moving the frame of the slider or the text.
精彩评论