How i can change the separator lines so they will disappear after the populated cell in UITableView

I've set each cell of UITableView with a gradient background, however, the gradients are displayed in each row where there are information. So after the information is displayed, there are some white cell with a separator displayed at the bottom. How i can change the separator lines so they will disappear, or set them white, or make a white background after the populated cell? Thanks in advance.

-For example, you have 5 cells but only 3 cells has content inside. So the iPhone will show gradient background and information on the top 3 cells while the bottom 2 are left with white background and nothing inside. Since I've set the separator black. the bottom 2 cells would also have the black separator. So how do you set the bottom two separators to white while maintaining the black separator for the top 3 cells.


in tableview u can change the separator style to none in interface builder or in code give it like this

self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;

For separator u can use for example:

self.mytable.separatorColor=[UIColor whiteColor];

But i don't really understand what you try to achive in background color.

Try one of these two:

tableView.separatorColor = [UIColor whiteColor];
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;

Note that your cells would need to draw some separator on their own then.

If You are using tableviewcontriller then use this line of code

self.tableView.separatorColor=[UIColor whiteColor];

Need Your Help

For delete trigger is not working (Microsoft SQL Server Management Studio)

sql sql-server-2008 triggers sql-delete

I have a table Universities and a table Cities. There is a m:n relationship between them, so the relationship is saved in a further table called CityUniversities. Now I wanted to write a trigger wh...

Best practices for implementing an iOS download manager with progress view

ios objective-c download progress

I have a UITableViewController displaying a list of audio files, when tapping on an audio file I push another UITableViewController showing a detailed view of the audio file. This view also feature...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.