views:

1260

answers:

2

I have an iPhone app that works fine in 2.x version of the SDK. When I upgraded to 3.0, the didSelectRowAtIndexPath method is no longer called, so the action when a user highlights a row doesn't happen. This is a custom UITableViewCell that is in a separate nib from the UITableView. Both the data source and data delegate are properly wired up in Interface Builder, and if I compile it to 2.21, it works. On version 3.0, clicking on the row doesn't do anything.

This question, mentions a similar issue, but they mention another first responder that is taking the click. I don't have any first responder methods hooked up to the cell or table.

How can I have the table work properly in 2.x and 3.0? The custom cell has a few labels and an image, and I just want to be able to click on a row and show the details for that particular row.

A: 

You probably won't like this answer too much...

Some things that worked in 2.2, don't work in 3.0 (you already know this). Some APIs have changed, etc…

A few things, however, are different because they were never supposed to work in the first place (according to Apple).

I can't be sure one of these changes is your issue, but it might be. Subtleties having to do with nibs and properties were definitely affected.

My advice would be:

First, check your nib connections, Maybe you have a connection missing that 2.2 let you get away with, but 3.0 will not.

Next, build a test app with a simple table view and see if you can get it to work. If it does, you should begin adding in complexities from your code into the test app until it breaks.

Unfortunately, this may take some time. You can also post some code to see if there is anything that we can find.

Corey Floyd
I ended up creating a new nib, copying the controls, and rewiring them in the same manner. This worked. I did a diff of the xib files and the only major difference in the new one was this line:<string key="IBCocoaTouchPluginVersion">3.0</string>I don't know why that wasn't added by XCode when I saved the old xib with version 3.0. That appears to be the only difference and now the xib works properly.
Tai Squared
A: 

I had this same problem. I spent hours on it trying just about anything you can imagine. The funny thing was it ended up not being a problem with my code.

I am using Objective Resource and after upgrading to version 1.0.1 the problem went away. Check all your third party libraries and make sure that you are using the latest to ensure you have their 3.0 changes.

Randy Simon