UIScrollView with UITableVIew and smaller increments than contents size - iphone

I have a UIScrollView as a subview of a CustomView that redefine the method hitTest, so the scrollview can scroll in smaller increments (the width of the scrollview is smaller than the window size) and I can also scroll inside the UITableView.
But the problem is that I only can scroll the table clicking inside the UISCrollView that is centered in the window with approx 1/3 of its height.
The UIScrollView is not wrapping it content, so it's displayed correctly. The problem is just the "click area" of the subview UITableView
Thanks!

Related

UITableView with dynamic height inside UIScrollView:

I have a screen with UINavigationController and UITabBar.
The UINavigationController screen is a UIView (in figure below, in red), that haves an image in the top and a UIScrollView (in figure below, in green). The UIScrollView have two UILabel ("Some text") and a UITableView that DO NOT ENABLE SCROLLING.
Every time the list become bigger, i need to enlarge the tableview height, dynamically. At the same time, I think I need to enlarge the UIScrollView. See the image below:
How can I define the dynamical height to UITableView and UIScrollView?
My goal is: Every time the list become bigger, the UIScrollView become bigger too.
My environment:
My UITableView DO NOT ENABLE SCROLLING
I am using XCode 4.6 and the view is a FreeForm
My view is using AutoLayout
I tried to do this setting just the UItableview height, without success.
How can I do this?
You can calculate the height of table view bin the method
heightForCellAtIndexPath:
in this method you pass the height of each row in this you can calculate height by creating a globale variable and in this variable add the row height each time.
or you can find it by having no of rows * height of a row in height of a row is constant.
may this will help you.

Scrolling UITextView over UIimageView like facebook popup images

I have an array of images and must be scrolled horizontally which i could manage, But in each image the description of the image but be scrolled upwards above the image something like i shown in the image. How it is possible?
Thanx
Jacu
Use a (horizontal) UIScrollView that contains UIView's. Each of the UIView's then contains an UIImageView, and another (vertical) UIScrollView that contains the UITextView's.
Make sure that:
the contentSize.height of the horizontal UIScrollView is smaller than or equal to its height
the contentSize.width of the vertical UIScrollView is smaller than or equal to its width
the UIImageView is added before the UIScrollView to the containing UIView
the background of the UITextView is (semi-)transparent
By the way, if the text is not editable, then you'll be better off using UILabel instead of UITextView

table view with both horizontal and vertical scrolling in iphone

I want to create a table view with both horizontal and vertical scrolling. The content in each row will be label with text. The horizontal scrolling should there when the label size increases the width of the table view. (ie, I dont want to show label's text like "abcdefg...") Is it possible?
Set the UIScrollView contentSize property through code and make sure that UIScrollView contentSize property will have the same height but it would have a greater width than tableView.
OR
You can use an UIScrollView and then inside add the UITableView. This UIScrollView will have the same size that your UITableView have now, but the UIScrollView contentSize property will have the same height but it would have a greater width.
You can use an UIScrollView and then inside add the UITableView. This UIScrollView will have the same size that your UITableView have now, but the UIScrollView contentSize property will have the same height but it would have a greater width.
see UITableView scroll both vertically and horizontally
and https://github.com/alekseyn/EasyTableView
use the following may it work for u.....
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation==UIInterfaceOrientationLandscapeLeft || interfaceOrientation== UIInterfaceOrientationPortrait);
}
also make changes in inteface builder to adjust size and width

iPhone how to implement a "Wide" UITableViewCell?

I'd like to have a UITableView with cells wider than 320 points. The user should be able to scroll sideways to be able to view different parts of a UITableViewCell. Is this kind of behavior possible with a UITableView, or should I go and try to implement a tiling UIScrollView?
I tried wrapping a UITableView within a UIScrollView, and the results are terrible - they compete for the scroll gestures and most of the time the scroll view wins, preventing the table from being traversed vertically.
Any input is appreciated!
Thank you!
Update: I tried the proposed solution and it scrolls properly, but the tableview is still only 320 pixels wide. Is tableView's width linked to the window bounds ?
Wrapping the table view with the scroll view is the right way.
UIScrollView with
Show horizontal scrollers
scrolling enabled
autosize to full screen
Inside that, a UITableView
shows vertical scrollers
scrolling enabled
Then I set the table view's frame, with w, being the calculated width of the table view with all columns, whatever your width, and kTableScrollViewHeight being the fixed height of both the table view and the scroll view, in my case, for example 367 points (screen minus status, navbar and tabbar):
tv.frame = CGRectMake(0, 0, w, kTableScrollViewHeight);
and the scroll view's content size
scrollView.contentSize = CGSizeMake(w, kTableScrollViewHeight);
If you want the scroll-to-top behavior when the user taps the status bar, you might want to set
scrollView.scrollsToTop = NO;
because otherwise the scroll view will take away the tap from the table view.

iPhone: UIScrollView not scrolling when adding item via IB

I'm trying to make a very simple scrolling page via IB. What I've got is a UIImageView at the top and 2 UIImageViews at the bottom, with a UITextView in the middle. I've disabled the scrolling in the UITextView as I won't the whole page to scroll up and down including the UIImageViews.
Can anyone tell me why the UIScrollView won't scroll up and down? All of the items above are subviews of UIScrollView via IB.
You can only scroll in a UIScrollView if the contentSize is larger than the frame. Have you set this?