Hi all, first post here and I'm just getting used to the world of iPhone SDK coding / editing.
I've got a problem I'm hoping someone can solve,
My idea is that i'd set up a UIScrollView with various images in a line, and instead of scrolling with your finger left and right, you could disable finger dragging, and instead press a button that would 'scroll' the view directly to the point you wanted to go to.
Just to clarify you'd have something like
1 2 3 4 5 - images in scroll view
then buttons representing the images
so when I pressed 'button 4' the scroll view would slide across and display that image.
Hope that all makes sense O_o
if there's anyway to do this i would appreciate the help ^_^
(oh and sorry if it's a silly question XD)
In my app Personal Photo Clock I use the following code in the help screen.
There is a left and a right button connected to leftPressed and rightPressed.
The scrollViewDidScroll is used to disable the buttons if left or right border is reached.
In my app Personal Photo Clock I use the following code in the help screen.
There is a left and a right button connected to leftPressed and rightPressed.
The scrollViewDidScroll is used to disable the buttons if left or right border is reached.
Hey thanks for that, I've played around with it a bit, but i'm a bit unsure as to the '-(void)' parts, I thought it needed to be an IBAction but i guess not..
Also it's giving me an error that 'pos' is undeclared O_o how should i declare it
My help screen consists of several images 320px width which can be scrolled by swiping left an right.
pos is an int variable which keeps the index of the screen displayed.
It is incremented/decremented if pressing left & right, updated if you scroll by swiping left and right.
sorry i did not answer earlier... but you already fixed the problem ;-)
hey no worries, there is a question you can answer in relation to all this though.
in your code where you talk about the position (*pos) as '320, 0, 320, 200'
what do these numbers relate too, and how would i change them to scroll up and down instead of left and right. I've tried altering the numbers to see what happens, but can't quite figure out what does what as i've ended up with some funny results (diagonal scrolling, then never scrolling back etc lol)