Problem in UITableView and UIScrollView - iphone

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.

Related

Implementing a dynamic height on UITableView

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....

How can I make the first and last UITableView cells stay on screen when scrolling?

I have noticed in the iTunesConnect iOS app, the first and last cells of the grouped UITableView stay on screen even though the other cells are scrolling through them. They also move with the tableview. For example when scrolling to the bottom of the table (moving up), the last cell moves up with the table as it leaves the bottom of its position on screen.
Does anyone have an example of how this could be done? I have tried setting the header and footer views but these scroll off screen when moving the tableView.
Thanks.
I think the best approach would be to use a plain UITableView with Header and Footer set, and "skin"/theme your custom UITableViewCells to look like grouped UITableViewCells.
you'd might want to have a look over here for some pointers on how to achieve this.

I Have Scrolling In Section in UITable

There is a table with 2 sections and each with 10 rows.
What i am trying is initially on view loading, table shows 5 rows in each section, and there is scrolling in each section individually to scroll in each section..
so not getting any idea ....
Pls help..
Thanks
You can put a UIScrollView inside your UITableView and add subviews to it, however, the scrollView and tableView might not register your touches properly all the time.

Let tableview's last cell scroll to half way up the screen

I have a tableview with custom cells. Each cell has a UITextfield. When the last cell's textfield is clicked, the keyboard pops up and covers it and the table view won't scroll up any further. Is there a property of UITableview that can be set so that the last cell can scroll to half way up the screen?
Thanks in advance
There are a two ways to approach this (that I can think about off the top of my head):
You can use the tableFooterView property of UITableView to set an arbitrary, empty view to be about half the size of your table.
You can add empty cells to the bottom of your table
Both of these approaches will accomplish roughly the same thing, but using the tableFooterView property is probably your best bet.
see Making a UITableView scroll when text field is selected for a list of solution..
Also basing your view controller from UITableViewController (since you say its a table) will provide all this functionality automatically!

Is it possible to stop UISearchBar from scrolling within UITableView?

For example: The UISearchbar within UITableView like of the iphone Address Book app scrolls with the the names.
Is it possible to stop it from scrolling so it stays on top?
Thanks!
You can set the searchbar out of table view if you dont want to get it scrolled.
Or you can add the searchbar to the header of section 0 instead of table header. boths gonna work.
hAPPY cODING...