I can not select the tableview and resize it on the storyboard. It cant be selected but the prototype cell can be selected and resized. The problem is that i accidentally dragged and dropped the tableview in the viewcontroller by completely covering the screen which looks pretty bad when executed.
What might be the problem? Thanks in advance!
Related
enter image description hereenter image description herei am trying to make a push to another view controller when i tap a cell that is on a scrollview but when i use the func didSelectrowAtIndexPath and run a tap the cell nothing happens ....
do you guys have some ideas ?
thnx !
From looking at your screenshot you do not need the scrollview inside the tableview as a tableview itself adds a scrollview for you. Try removing this (and adding the cells straight under the tableview hierarchy) and see if it works.
If not add some code to your question about how your view controller is set out etc.
I've a simple UICollectionView with the CHTCollectionViewWaterfallLayout and 3 cells with a height between 300 and 400 pixels. The cells contain a view from a UIViewController which has a non-scrollable UITableView as subview.
It's all shown correctly but there is one problem. If I scroll to the bottom of the collection view on the iPhone and let them bounce one time, the last 2 visible cells disappear.
The cells are not higher than the screen of the iPhone. I also tried this in viewDidLoad:
if ([self respondsToSelector:#selector(setAutomaticallyAdjustsScrollViewInsets:)]) {
self.automaticallyAdjustsScrollViewInsets = NO;
}
It doesn't change anything. The views in the cells are inserted by code, there isn't a XIB or storyboard for the cells. If I remove the line to insert the views the cells are still visible while and after the bounce. Does this mean it's a problem inside the UITableView?
Do you have any suggestion for me?
Thank you!
EDIT: The problem also reproducible when I hide the UITableView inside the subview.
I have a UITableView embedded in a UIViewController. The TableViewCells are rows for the user to select something, so when they touch it a checkmark appears, heres where my question comes in:
I dont want the UITableView to scroll in its window, I want the TableView to grow with the items it contains. Do I need to put a scroll view on the UIViewController and then the TableView on that? Or will the ViewController scroll if the content is bigger than the View?
Also, Im not even sure where to start with changing the height dynamically of the UITableView, everywhere I look its about changing the cell heighets dynamically.
Please Help! Thank you!
self.tableView.scrollEnabled=false;
stops the scrolling
self.tableView.frame=CGRectMake(0, 0, (float)width, (float)height);
sets the size of your tableview
But I don't understand why you want to stop tableview scrolling and to scroll the whole view....
I have one UITableView displaying some data, and when the user begins typing in a UITextField above the UITableView, another UITableView is displayed below the UITextField to show suggestions. This "suggestions" UITableView overlaps the UITableView below the UITextField. Tapping on one of the suggestions will populate the text box with the item tapped.
The suggestions UITableView displays in front of the other UITableView, but problem is that none of the taps to the suggestions UITableView register if they're outside the bounds of the view that contains it.
This is probably a really simple problem dealing more with UIViews in general, but I'm having trouble. Thanks for the help!
You have to adjust your second tableview which is giving you suggestions below testfield which will solve most of your issues
hope it helps you
you can show the second UITableView within another view that is displayed above the current view, like a popover, using
[self.view addSubview:secondView].
Once a selection is made, you can remove this view using
[secondView removeFromSuperview];
My table has more than 10 rows with 50 row height....so i can't select my last row....so i have set UIScrollView and add this table into UIScrollView.
Table display perfectly but which rows are displayed in UIScrollView, these are not selectable.
How can i get this row selecablt in UIScrollView. If anyone body know then pls tell me wha to do?
Thanks,
Haresh.
Putting a UITableView inside a UIScrollView won't work, beause UITableView is a UIScrollView. You're going to have to work out why UITableView won't scroll properly for you on its own.
Check how you initialize it and look at some of Apple's example UITableView code to see what is different.
It may be that your navigation bar, toolbar or some other control is hiding that last row. Check to make sure the tableview partly under another control.