Learn iPhone uikit (1)
1. Do not use the hello World Program of interface builder. Write the Code as follows:
In addition, to delete the mainwindow. XIB file, delete the item "Main NIB file base name" in the info. plist file.
2. the position and size of the uiview are as follows:
Use the frame or center attribute
:
(1) The code comments the code set for the center.
(2) The code set by the center and the code set by the frame are not commented out.
(3) The code set for frame is commented out, and nothing can be seen.
3. Use the sizetofit method to adapt the uiview content.
4. Affine Transformation:
5. nested uiview:
The code for the button action is as follows:
:
6. Code for inserting and deleting child elements:
(1) The effect is as follows:
(2) Exchange results, code:
(3) Delete child 3 code:
7. Search by adding tags and uiview. Code:
:
** Note: @ selector (searchdidpush) has no colon !!!