ios - userInteraction is enabled but button action isn't called -


I'm new to iOS programming my cell in a NIB. This cell displays an image that is working fine. I do not want the cell to do any work or to be selected. Therefore, I have the following code:

  cell. Selection style = UITableViewCellSelectionStyleNone; Cell.contentView.userInteractionEnabled = Yes;  

My problem I have a button that is not said on touch. I have an action defined Sel.am file but nothing happens I button to add programmatically, but in vain. I appreciate any help or signal because I have tried this for the past few hours. I am pretty sure that I am doing something silly.

Update:

This way my cell xib structure looks - here Enter image details

Cells there. Nib, cell.m and cell.h. The main view controller is that it uses the DQURU equilibel vethidentifier method to get the cell. It works fine because I can see cell with the correct image. The action method is defined in cell.m image description here.

Here is the xib file

thanks. After you check

SHTableCell.xib That you have prevented user interaction on the cell, enabling the user's contact on it will not make any difference to contentView / subview s.

In your xib, select " test cell " and " user interaction enabled "


In addition to this, It looks like you have not specified a reuse identifier on the cell.
It would be better if you specify one so that your -cellForRowAtIndexPath: could reuse the cell

so ... if you have something like this:

  - (UITableViewCell *) TableView: (UITableView *) Table View CellForArendAppath: (NSIndexPath *) indexPath {//. .. SHTableCell * cell = (SHTableCell *) [TableViewDevUserCellWithIdentifier: @ "Some Identifier"]; // ...}  

Then, " some identifier " what should be in the first place in the EXib.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

c# - Create dynamic LINQ query expression at runtime which translates into a parameterized SQL query for nullable types -

cmake - cpack generates RPMs with %files entries that conflict with the RPM spec. How to fix? -