I having the Dynamic data, I load that data into tableview but these data having the mixing of Attributed and normal strings.
Here I getting the as "Tap here" ,I want to dilate that string with Blue colour and pick on that it need to open the url.
I write following code but it gives error.
Binary operator '+' cannot be applied to operands of type 'String' and 'NSMutableAttributedString'
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "WhatisrewardsTableViewCell", for: indexPath)as! WhatisrewardsTableViewCell
cell.imageview.image = images[indexPath.section][indexPath.row]
cell.titlelbl.text = tilenames[indexPath.section][indexPath.row]
cell.desclbl.text = descriptions[indexPath.section][indexPath.row]
let value = " here.".withTextColor(UIColor.disSatifyclr)
if (cell.desclbl.text?.contains("tap"))!{
// cell.desclbl.text?.attributedString
cell.desclbl.text = descriptions[indexPath.section][indexPath.row] + value
}
cell.desclbl.addLineSpacing()
return cell
}