This error occurs when we assign a value directly to Self.view.frame.size.height = 100 in OC, the reason for this error is that:
Self.view.frame is the point syntax of objective-c syntax, and the Frame property is a cgrect structure, Frame.size.height is the C language syntax, because OC is only a C language extension, so the above sentence into the C language of the form of conversion will become:
GetFrame (). Size.Height = 100f;
In C, the return value of a function is a r-value, which cannot be directly assigned to him (the so-called R-value, which can only appear on the right side of the equal sign, you may understand it as a constant, but can be assigned to the L-value, which can appear on the left side of the equal sign, usually a variable). This error occurs when you assign a value directly to it. The solution is to add a zero variable to the function, modify the zero variable, and then assign the value to the frame. You can modify the height and width values in the frame.
Example:
1. Saves the return value with a temporary variable. CGRect temp = self.view.frame;//2. Assign a value to the variable. Because the variables are l-value, they can be assigned temp.size.height = 100f;//3. Modify the value of frame self.view.frame = temp;
About the error cause of expression is not assignable in OC