PDA

View Full Version : UIScrollView - Showing user more content is available on scroll




ashwinr87
May 23, 2011, 09:20 AM
I have a scrollview where more data is visible to the user if the user scrolls to the left or scrolls to the bottom. But I am unable to find a way to tell the user that more content is available on scroll. It is not intuitive and only by experimenting, will the user find out about the scroll option.

Is there any way I can show/tell the user that scrolling is available?

Using [scrollView flashScrollIndicators] is not exactly useful as it just flashes the indicators and it is so quick that the user would surely fail to see it.

It would be great if someone can help me with this.



nickculbertson
May 23, 2011, 09:41 AM
There are a number of approaches you could take. You could add a label that says "scroll to view more" and fade it to alpha 0. You could add a paging image to the bottom of the screen that indicates the user is currently in position one. You could add arrows that would auto scroll. You could chop off a word or image by a scrollview and the user would probably figure it out. There is also probably a way to show the scroll bars at all time but I'm not sure how.

Nick

ashwinr87
May 23, 2011, 10:45 AM
thanks for the reply nick...
right now I am chopping the word such that the user figures that he needs to scroll.. but I was looking at a more intuitive option so that the user knows as soon as the page loads, that more data is available on scroll..

your option of arrows to auto scroll is very interesting... would you be able to point me in the right direction of how I could achieve that??

There are a number of approaches you could take. You could add a label that says "scroll to view more" and fade it to alpha 0. You could add a paging image to the bottom of the screen that indicates the user is currently in position one. You could add arrows that would auto scroll. You could chop off a word or image by a scrollview and the user would probably figure it out. There is also probably a way to show the scroll bars at all time but I'm not sure how.

Nick

nickculbertson
May 23, 2011, 12:00 PM
Yeah, just make a couple of buttons with arrows as the image and make an action like


.h
int Count;

.m
-(IBAction) pushright{
Count++;
[scrollView setContentOffset:CGPointMake(Count*320, 0) animated:YES];
}
-(IBAction) pushleft{
Count--;
[scrollView setContentOffset:CGPointMake(Count*320, 0) animated:YES];
}


I'd turn off user scrolling for this approach.

or you could try this (http://code.davidjanes.com/blog/2009/09/26/uipagecontrol-uiscrollview/) for page control.

Nick

ashwinr87
May 23, 2011, 12:03 PM
ok.. thank you nick...

Yeah, just make a couple of buttons with arrows as the image and make an action like


.h
int Count;

.m
-(IBAction) pushright{
Count++;
[scrollView setContentOffset:CGPointMake(Count*320, 0) animated:YES];
}
-(IBAction) pushleft{
Count--;
[scrollView setContentOffset:CGPointMake(Count*320, 0) animated:YES];
}


I'd turn off user scrolling for this approach.

or you could try this (http://code.davidjanes.com/blog/2009/09/26/uipagecontrol-uiscrollview/) for page control.

Nick