I want to add a button in a UITableViewCell. This is my code: `
UITableViewCell
if (indexPath.row==2) { UIButton *scanQRCodeButton = [[UIButton alloc]init];
Method setTitle does not work in my code, so I have set by using
setTitle
[UIButton.titleLabel setText:@""]
instead of using setTitle method.
Please try again with following code:
[scanQRCodeButton.titleLabel setText:@"Hello"];
Then it would work well.