z-Position for background of a UITableViewCell

I am trying to put the background of a UITableViewCell on top before selection and reverse it after.

The reason is that there are Label and images which prevent the selection but it is working where this is nothing but the background.

I tried :


Unfortunately it is not working.

If anyone has an idea to solve this problem, I will really enjoy it.

Thank you in advance.


I finally found a better way to do that.

I have completely disabled user interaction on every cells before selection. Like that, no need to put the background in the first z-Position.

I used the following method at the creation AND the didDeselectRowAtIndexPath method:


I put YES on the didSelectRowAtIndexPath method. It works perfectly.

Need Your Help

Need to run a TCP server besides a Rails app

ruby-on-rails windows tcp

I have a Rails 2.0.2 application running with a postgresql db. The machine will receive data on a TCP port. I already have coded a working ruby multithreaded tcp server to receive the requests, but I

How to exit a loop when user presses Command + period on the keyboard

objective-c osx cocoa

My utility app performs text editing operations on another app.

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.