While it is natural to put it in the contentView of the cell, I am pretty sure that this is not a problem (in fact, in the past I never had subviews view correctly in the contentView, so I always used the cell).
In any case, the problem is with the first three lines when you start creating your button. The first two lines are fine, but the code stops working with:
scanQRCodeButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
buttonWithType: ( alloc-init). " " ( ). init buttonWithType: , .
UIButton *scanQRCodeButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
scanQRCodeButton.frame = CGRectMake(0.0f, 5.0f, 320.0f, 44.0f);
scanQRCodeButton.backgroundColor = [UIColor redColor];
[scanQRCodeButton setTitle:@"Hello" forState:UIControlStateNormal];
[cell addSubview:scanQRCodeButton];
( , cell.contentView, ). Automatic Reference Counting (ARC), , , buttonWithType: .