From the docs:
A table view in the UIKit framework is limited to a single column because it is designed for a device with a small screen.
Have look in the developer docuementation A Closer Look at Table-View Cells how to setup multiple columns in a table view cell.
Yes... unless you add subview in cell that looks like more than one column...
i.e 2 label in each cell with same size and horizontally aliened can look like Table with 2 column...
What about putting another tableview next to that one and synchronize the movement (scrolling)? :)
Related
Is it possible to have a UITable with cells that are all the same, each containing buttons that only effect that cell (based on indexPath.row I'm guessing), without having to make a custom cell?
I too need this, but I have a custom cell.
#kaylaGalway your method sounds like it could work for me, could you elaborate? As I have been searching for this answer for hours now (Swift 3)
You can design your table cells freely. It is possible to have a different cell for each and every row within the very same table.
When you have matching cell types for each row you can also add buttons (one or more) in these rows. They can also point to the very same function. With a clever usage of the 'tag' you can identify each individual button. Using the Indexpath.row you can naturally also identify the row in the table.
I want to create an effect similar to the Open Table application. I want the section header to stick to the top as I scroll the table. This is of course the default behavior with a plain table view, but because of style, I want a group table view.
Any ideas or suggestions?
One way to do it (I'd wager OpenTable does it this way) is to use a plain table style but dress the cells yourself as grouped. You'd need 3 background images for the cells, one for the first cell in a section (with rounded upper corners), one for the last row in a section (with rounded lower corners), and one for the others that looks like grouped cells (with left and right insets).
Is it possible to customize the column of table view.
By default table view contains 1 column, But according to my requirement I want 4 column in table.
Means I want table like we create in MS-word/excel.
Thanks.
http://dewpoint.snagdata.com/2008/10/31/drawing-a-grid-in-a-uitableview/
ad
http://usxue.is-programmer.com/posts/14176.html
will help you
No there is no such method to do that ..... but for sure u can make a subclass of UITableViewCell such that it has 4 parts in it and all parts are seperated by a fine line (a kind of bordered image as background will do the job). You can manage your data accordingly and it may create an illusion of MS-word/excel.
But I am sure you are aware of column and row of UITableView, so you can manage all your data is this format. If you want to represent data in tabular fashion like MS-word/excel you don't have enough space as width on iPhone and If you incorporate a tableView in a scroll view, two scroll will not be user friendly.
So i suggest you to go with TableView's native behaviour for such type of task.
What i mean by this is that cell1 would be top left. Cell2 would be top right. Cell 3 would be below cell 1, cell 4 would be below cell 2 etc..
Is there a way to do this?
UITableView does not support this out-of-the-box. You can fake it, but you might also want to try using something like AQGridView.
The UITableView only allows for one column, so it's really more of a stack or list than a table. To do what you are talking about you will need to create a custom UITableViewCell either in Interface Builder or code that "fakes" columns through layout, but you will only ever have one cell per row.
From the Documentation:
A table view in the UIKit framework is
limited to a single column because it
is designed for a device with a small
screen.
I like to create a cell like contacts's add instant messages table view, with two cells to select: "AIM" and "home".
May be I can use the custom table cell as the cell's content view, but the table view framework always treats
one table view' cell as a whole, for example ,how to respond to did select row at index path message?
I'm pretty sure that Contacts is using a single cell.
The illusion of two cells is created by a custom cell that contains two buttons each configured to look like a tableveiw cell.
To get the same effect as Tweetie's split cell, create a custom cell and add a Segmented Control and create title and detail labels