I have UI textview inside UIscrollView, so UIscrollview scrolls horizontally and vertically at the same time. is there any way to disable scrolling in horizontal way and enable scrolling to the vertical way ?
thank you
If your scrollView scrolls horizontally, that's means that your textView or another subview is wider than the scrollView's frame.
Related
I have implemented a UIScrollView, which has a content view. Content view contains the UILables to display texts. Eventhough i have the necessary vertical scrollview for long paragrpahs, there is an unnecessary horizontal scrollview as well.
In this case, position the control view horizontally center in container. This should prevent the horizontal scroll.
Thanks in advance. In my project am using paging and scrolling. but when i scrolling one page to another page we can able to scroll in horizontal, vertical and diagonally but i want to scroll only in horizontal direction only. Any one can suggest me.
It will scroll vertically if you have its content size height set to more than actual height of scrollview height..
To remove vertical scrolling do this.
scrollview.contentSize = CGSizeMake(YourWidth,scrollview.frame.size.height);
you can also set
scrollview.bounces = NO ;
to remvoe Bouncing.
Set the contentSize of UIScrollView such that the width of the contenSize is always equal to the width of the UIScrollView. Just vary the height of contentSize.
Goto to Xib->Select the Scrollview and Disable the Vertical Scrolling property in Xib file
Disable vertical scrolling and set proper height (max is the height of the scrollview) for subviews in all the pages...
I'm working on a iphone game, and part of it includes a section where you scroll horizontally through a list of images (which have transparent backgrounds).
but I also want to be able to vertically scroll and change the background image, without the image in the horizontal scroll view changing.
I have the horizontal scrollview working now, and I've placed a second scrollview behind it for the vertical scrollview, but obviously the vertical scrollview doesn't catch the up/down swipes.
Is there some way to push vertical swipes through to the second scrollview, but catch the horizontal swipes on the first?
Mike
IF you implement the scrollViewDidScroll Delegate for the first scroll view and catch the scroll offset, you can pass the same to the second scroll and control how the offset moves on the second scroll.
Is it possible to do vertical scrolling without horizontal scrolling in UIScrollView? How can I do this?
The property pageEnabled should set to TRUE, for paging scroll.
The contentSize's width is as the same as view's width, and the height of contentSize set the value you desired. Then, it will do vertical scrolling, but no horizontal scrolling in UIScrollView.
You can read this sample coes, ScrollViewSuite. Maybe there are something you need in the sample codes.
How to make Horizontal Scroll allow in UITableView ? I add label in cell content view with frame. However, can't show in Portrait view. I want to allow horizontal scroll bar on Portrait view. I already check on Scrollers Horizontal in UITableView but it's not working.
I think you can't have a horizontal scroll in uitableview.
Maybe you should associate with UIScrollView to be able having a horizontal scroll ^^
You see the trick ?
Good Luck !