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
Related
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.
I got a UIView that contains an UIIMageView and several buttons that are allocated on certain position related to the image of the UIIMageView.
The frame of the UIView is (0,0,250,250)
the UIIMageView that is within the UIView is set to autorisizing (all) in IB.
All buttons are set to autoresize (none) and origin middle.
When i change the frame of the UIView i.e (0,0,500,500) the UIIMageView (and image) resize OK but the buttons lose their perspective position by a few pixels (about 2 to 3 in the vertical and horizontal axis).
Is this normal? can someone advise?
Try putting the buttons inside another UIView and then setting the autoresizing options on this new view. You should leave the buttons without autoresizing inside the new view.
there is no answer after all.
I must accept the fact that the resized view and the buttons within it will lose perspective position by 2/ 3 pixels off the x/y axis...
strange....
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
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!
I have a UIScrollView that contains 2 UIImageViews. I turn on the pagination properties and am able to scroll vertical pages (480). Now I want to add another UIImageView that will act as separator between the images and keep the vertical scrolling height. Means that every time I'll scroll, I'll see the separator but stop on the full image. Thanks.
This UIView method might do the trick: hitTest:withEvent:See UIScrollView Custom Paging