Ccna final exam - java, php, javascript, ios, cshap all in one. This is a collaboratively edited question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
Sunday, April 22, 2012
How to customize tableView seperator in iPhone
By default there is a single line separator in uitableview.
But I want to put my customized line as a separator.
If you want to do more than change the color of the separator using the separatorColor property of the UITableView then you could set the separatorStyle property to UITableViewCellSeparatorStyleNone and then either:
create custom UITableViewCells that include your custom seperator within them create alternate UITableViewCells that include your custom separator
For example, if your table currently displays 5 rows you could update it to display 9 rows and the rows at index 1, 3, 5, 7 would be separator cells.
See Subclassing UITableViewCell in the Table View Programming Guide for more information on how to create custom UITableViewCells.
I dont know if this can be done "automatically" with some setting. But a suggestion would be to set the line separator as none, and in the borders of your cells actually draw your line separator that you want..
If you want to do more than change the color of the separator using the separatorColor property of the UITableView then you could set the separatorStyle property to UITableViewCellSeparatorStyleNone and then either:
ReplyDeletecreate custom UITableViewCells that include your custom seperator within them
create alternate UITableViewCells that include your custom separator
For example, if your table currently displays 5 rows you could update it to display 9 rows and the rows at index 1, 3, 5, 7 would be separator cells.
See Subclassing UITableViewCell in the Table View Programming Guide for more information on how to create custom UITableViewCells.
I dont know if this can be done "automatically" with some setting. But a suggestion would be to set the line separator as none, and in the borders of your cells actually draw your line separator that you want..
ReplyDelete