Cause: the attributes associated with the storyboard are deleted, but the previously associated attributes are maintained in the storyboard.
Solution:
Solution: Check this
1. Click
2. It will be displayed
3. Select, which indicates that X appears when editing.
Effect:
I.
Cause of error: 1. The btnClick method is not implemented.
Solution 1: add this btnClick Method
Solution 2:
1. Click view controller.
2. Click the last button in the row.
3. will appear
4. No exclamation point found. It's the same as before. It's okay if x is used.
Note: The colon in OC is also part of the method name. Remember!
II.
Error cause: OC Syntax: Members of the structure attribute of an object cannot be directly modified.
_ Btn is an object
Frame is a struct.
The object and struct are different. The struct is in C language and can define many attributes, but cannot define methods. The object can define attributes and define methods, is a typical object-oriented syntax.
How to change the members of the struct attribute in an object:
Solution 1:
// Since the struct attribute member in the object cannot be directly modified // retrieve the struct CGRect frame = _ btn first. frame; // modify the structure frame. origin. y-= 10; // assign the modified struct value back to _ btn. frame = frame;
Solution 2:
// Obtain the y value CGFloat y = _ btn first. frame. origin. y; // modify y value y-= 10; // reset the y value of _ btn. Other attributes and _ btn remain unchanged _ btn. frame = CGRectMake (_ btn. frame. origin. x, y, _ btn. frame. size. width, _ btn. frame. size. height );
III.
Error cause: Point syntax cannot be used for id type
=*button = (UIButton *= button.tag;
Solution: uncheck this option.
_btn.transform = CGAffineTransformMakeTranslation(, = CGAffineTransformMakeScale(, );
In this way, create a new transform and assign a value to the transform of the button. The second assignment will overwrite the previous assignment, so the expected effect will not be reached.
Solution:
_btn.transform = CGAffineTransformMakeTranslation(, _btn.transform = CGAffineTransformScale(_btn.transform, , );
Clear Saup