I am having trouble in accessing which is in the UITableViewCell, that i have placed in my main .xib file.
That Label is connected to IBOutlet servicesCell.
And the Label inside the table view cell is connected through IBOutlet serviceLabel.
At runtime i am not getting the text which i am assining to that label.
Following is my sample code for that.
static NSString *ServiceIdentifier = @"ServiceIdentifier";
UITableViewCell *cell1 = [tableView dequeueReusableCellWithIdentifier:ServiceIdentifier];
if(cell1 == nil) {
[[NSBundle mainBundle] loadNibNamed:@"servicesCell" owner:self options:nil];
cell1 = servicesCell;
}
// label access
serviceLabel = (UILabel *)[cell1 viewWithTag:1];
serviceLabel.numberOfLines = 3;
serviceLabel.lineBreakMode = UILineBreakModeWordWrap;
[serviceLabel setTextAlignment:UITextAlignmentLeft];
[serviceLabel setText:@"Testing String"];
Anyone have any idea then please help..
Thanks in advance..