ios - changing a customlabel within an expanding UItableviewcell -


I have created a custom table cell that spreads. When it is spread, it shows UILBL with two UIButtons that UILBL should show data from the backend. I have created customlabel in the CustomCell interface file, then I imported the customcell class into my InboxTable VIPU controller, and implemented custom cell. The label only appears when the cell is tapped, and spreads. How would I go about changing UILabel, because cell.customLabel.text will not work here, because it is not the property of the cell. Here is the related code:

  CustomCell.h @interface Customcell: UTable Viewer {UIImage * userImage; UILBL * Username; // The widgets below will be displayed, when the user has left the public UI button * button, * the right button; UILBL * Custom Label; BOOL UserTap; } @ Property (weak, non-monomitive) IBotllet UILBL * Username; @ Property (weak, non-monomitive) IBotlet UIIMAviewView * user image; - (zero) set data: (NSDictionary *) D; @end  

and the InboxUntinator here. M is where I try to implement customcell with customcell.

: - (UITableViewCell *) TableView: (UITableView *) Table View CellForAatInpath: (NSIndexPath *) Index Path {Fixed NSString * CellIdentifier = @ "cell"; Customcell * cell = [tableview dequreablecalevillidentifier: cellindex for indepaypet: indexpath]; If (! Cell) {cell = [[custom CL Alok] initWithStyle: UITableViewCellStyleDefault reuseIdentifier: CellIdentifier]; } Cell.selectionStyle = UITableViewCellSelectionStyleNone; // PFObject * message = [auto. Message Object Index: IndexPath.ro]; PFObject * Message = [auto. Message objectinux: indexpath.ro]; Cell.userName.text = [Message ObjectForchy: @ "From"]; //cell.userImage.image = [Message Object: @ "Image 1"]; Cell.customLabel.text = [Message ObjectForcae: @ "Message"]; Return text after the return cell;}

As you are creating the say of CustomCell instead of working directly You will not be able to say this customLabel in loading the CustomCell view from Nibb and you can set the text using this, you can use the code given below.

  CustomCell * cell = [TableView dequeueReusableCellWithIdentifier: CellIdentifier forIndexPath: indexPath]; If (cell == zero) {NSArray * Nib = [[NSBundle mainBundle] loadNibNamed: @ "CustomCell" owner: self choice: zero]; Cell = [nib object at index: 0]; }  

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -