I have a Custom UITableViewCell(two UILabels in it) in a UITableView when I am trying to dequeued it works proper but when I am trying to show values that was passed by me in the UITable its not showing in the Custom cell but just dequeued correctly and have a big height(because of this I knew that it was dequeued correctly).
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
EngineerCell *cell = (EngineerCell*) [tableView dequeueReusableCellWithIdentifier:@""];
Engineer *engr = [self.engineers objectAtIndex:indexPath.row];
cell.engrName.text = engr.engrName;
cell.engineType.text = engr.engineType;
cell.experience.text = [NSString stringWithFormat:@"%d",engr.experience];
NSLog(@"a%@a",cell.engrName.text);
return cell;
}
It seems no response but dequeued correctly.
[inp rangeOfString:@","]returns the first instance of the comma, so when there is a comma as a suffix, you're deleting all of the numbers after the first comma.You could use
[inp rangeOfString:@"," options:NSBackwardsSearch]or split the array withcomponentsSeparatedByString:, but for a more robust approach, consider replacing all of this with a solution that usesNSScanner.