How to display multiple objects in a single row in my UITableVIew? - ipad

I want to display three items in my UITableView's row. What should be best and efficient way to do this.
Any suggestions?
Thanks,

Take a look at this example:
http://cocoawithlove.com/2009/04/easy-custom-uitableview-drawing.html
It shows you how to customize many aspects of a UITableView (and cells too).

Related

UITableView with multiple types of cells

What is the best approch to make feed view like shown in picture ?
One approach I know is One section per post and multiple rows for internal content.
But when there is repeating content like Comments here what to do ? I am looking for better approach.
Help!!
You can add a UITableView as a subview of a UITableViewCell! It can get a bit hairy when creating a data source for such a thing, so it's best not to use the same ViewController as the delegate for your main table and each cells table.

Ways to hide/show many items in a TableView

I have a view controller that calculates land taxes for the Canadian provinces. Each one of these had different inputs, so the tableview that holds then ends up with three dozen fields.
I've seen code here that uses sectionIndexTitlesForTableView to show/hide sections, and perhaps that is what I'm looking for. However, I find this practically impossible to work with in IB, the table extends way past the end of the display. Is there some way to deal with this?
Or perhaps I should use multiple tableviews stacked in IB and hide/show them as a whole?
The easiest way to hide an entire section in a tableView is to return 0 in the tableViewControllers numberOfRowsInSection.

Two UITableViewCells in One Row

Can somebody expain how to put two uitableview cells in one row, as per whatsapp screenshot below with +353 and Phone Number? Thanks
They might be just two UITextFields in a single table cell.
There are several ways to achieve this.
You can design whole as in a UIView and add to the cell.
Create only create the view for phone number input and add into the footer of table and leave other as cell.

Is there a option to add a new row in shinobi grids?

First of all i am using shinobicontrols for developing interactive UI controls (Grids) for iOS using Objective c and please don't suggest me some other controls as an answer because i need to use only this.
I am half way stuck while using this control. i have downloaded demo code for grids provided by shinobicontrols (trial for 30 days). from : http://www.shinobicontrols.com/shinobigrids/product-tour/get-started-quickly-and-easily/
I was able to reorder rows and columns, edit contents of cell, re size column width by pinch gesture and much more.
But i couldn't add a new row or column to the existing grid. Just wanted to know whether this can be achieved.
Thanks in advance.
Edit the datasource (add/remove) item and just do [grid reload];
I think this should do.
The above answer seems to be correct. Adding my views Shinobi grids can be considered as UITableView cells, If you simply change the data source array of the tableview and call [tableview reloadData], number of cells displaying on the view will also change. There is no option to add a row still.
Look at this one. It is in alfa stage, but it will be quite a powerful in month or two, I would say. Any suggestions are welcome and it's free, of course. Number of rows and row content is fully controlled from delegate, so it is dynamic.

Can I use more than one custom tableviewcell nib file in a UITableView?

I want to put different cells in a table, and all of them is kind of complexity, so I want to use nib for these cells. However, i really don't know how to use multiple cells in a table. Can you help me?
You can use as many custom UITableViewCells as you want in a single UITableView. The issue here is: What kind of logic do you want to implement? Only you can define it. You can start by using this tutorial to see how to implement the custom UITableViewCells:
http://cocoawithlove.com/2009/04/easy-custom-uitableview-drawing.html
You can then reply to my answer to tell me what logic do you to implement. For example:
first 3 cells one with a type of UITableViewCell, then 3 with different UITableViewCell.
Alternate between cells (for instance, 4 different UITableViewCells in a row)
You need to specify what you need. :)

Resources