I want to display a UITableView within the cell of another UITableView without using custom cell.
I tried to display it using a customCell, it is working but that is not convenient for me. So I would like to present the UITableView within a cell of other UITableView without using customCell
Can anyone tell me how to do this?
Many thanks in advance.
You should use a custom cell for this kind of thing. I don't think there is a way to implement it without a UITableViewCell subclass.
Look at this tutorial for some inspiration:
How To Make An Interface with Horizontal Tables Like The Pulse News App
Related
I´ve got a TableView with a Searchdisplay and when the user tabs on a cell, the cell accessoryType toggles between none and checkmark. That works fine, when i´m using only the tableview. But when I select a cell while i´m using the searchdisplay, the selection won't be applied to the "normal" tableview.
Maik
can you show me or tell me which type of data you are showing on table. and are you using a simple array? i have a method for solve this problem.
NOW i give you a tips when set chekmark you need to make changes in orignal array.How?When will you explain it. Then i can give you good method to do this.
Is there a way to unload/release a UITableViewCell such that the containing UITableView calls cellForRowAtIndexPath: when it is needed again?
I understand that this is exactly what UITableView does by default, but only once the cells are outside the tableview frame. My custom view uses UITableView in such a way that its frame == content size.
If there is no way to unload specific cells, I'll have to think of a different approach.
The method [UITableView reloadRowsAtIndexPaths:withRowAnimation:] allows you to tell the table view to reload one or more cells. This will reload the specified cell(s) if they are on screen and presumably do nothing if they aren't currently on screen. Sounds like what you want though your question is not entirely clear to me.
What is the Right Way to Implement This?
For example, say I created an XIB file with a button in it. Say a button on that custom controller get pressed, how do the program knows which "row" of the UITableView get pressed? Does each row has their own UITableViewCell Controller?
There has to be one right way to design this.
You can follow the tutorial for custom cells -
http://cocoawithlove.com/2009/04/easy-custom-uitableview-drawing.html
You are asking about two different controls (buttons and cells), but anyway both have a similar way to "communicate" with the controller. With the button's tag and the cell's index, you have enough to be able to manage the use of these controls.
Hey I need a fairly large cell to show my information, but when I put text in it, the text starts from middle weirdly, how can I make it so, that it starts from the top?
Thanks in advance!
I recommend you that you use a custom UITableViewCell so you can place the elements wherever you need them to be. Here you have a couple of links that will help you do so:
Custom UITableViewCell using Interface Builder
Creating Custom UITableViewCell Using Interface Builder
I hope it helps,
Regards
I have a UITableView with customized UITableViewCells, now i have already placed one UISearchBar to find one of the data in UITableViewCell and it is working fine.
Now i want to do search operation for the other data which is placed in UITableViewCell, so is there a way to place another UISearchBar programmatically?
Yes. It's totally flexible. You just need to create the cell and you can control the placement using the UITableViewDataSource/Delegate methods.