I have a search any specific word like "God". I want to change that specific word text color should be change in different color. I have try to search on google but I have found out that a specific word color change for particular index value from start to end of word Link that's why my problem not solve.
Please Help me and update my code for change the specific word text color i.e the word in the box you have see in the image.
Thanks
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:UYLCellIdentifier forIndexPath:indexPath];
[self configureCell:cell forRowAtIndexPath:indexPath];
return cell;
}
- (void)configureCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
if ([cell isKindOfClass:[UYLTextCellSearch class]])
{
UYLTextCellSearch *textCell = (UYLTextCellSearch *)cell;
DataBase *DBContentDetail = [_sourceData objectAtIndex:indexPath.row];
textCell.lineLabel.text = [NSString stringWithFormat:@"%@",DBContentDetail.dbtext];
[textCell.lineLabel sizeToFit];
}
}