I am new to Swift. I am getting this error:
Cannot assign to property: 'width' is a get-only property
While using this statement:
cell.reciverMsg.frame.width = cell.reciverMsg.text?.characters.count * 2
reciverMsg is an UILabel.
You need to set the width of the frame's size property.
cell.reciverMsg.frame.size.width = 20
The width property of frame is just a read-only convenience. See the documentation for CGRect for details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With