Lvalue required as left operand of assignment
问题 I want to assign suitSize to scrollButton what I'm doing wrong? UIView *scrollButton = [suitScrollView viewWithTag:1]; CGSize suitSize =CGSizeMake(10.0f,10.0f); (UIButton *)scrollButton.frame.size=suitSize; 回答1: frame is a property, not a structure field. You can't assign to a subfield of it. Think of it as a function call; dot syntax for properties is convenience. This: scrollButton.frame.size = suitSize; Is equivalent to: [scrollButton frame].size = suitSize; Which doesn't work; it doesn't