Animation, Auto layout
Views
How to draw a custom image
Gestures
How to handle user gesture actions
Views
1, it is the basic building block, represents a rectangular area on the screen, defines a coordinate space, in this space can be drawn, you can add touch events;
2, it is hierarchical level, you can nest views in the view;
3, a view has only one parent view, but can have many sub-views, the view is a rectangle, can overlap;
4, UIWindow, all views are displayed in
Self.view.window
5. Commonly used initial templates
-(void) setup{...} -(void) awakefromnib{[self setup];} -(void) initWithFrame: (cgrect) arect{ = [Super Initwithframe:arect]; [Self setup]; return Self ;}
-The initialization operation is defined in the Setup method;
-then the first is to override the specified initialization method, in which the setup is called;
-Second, Setup needs to be called in awakefromnib, because awakefromnib is called when a UIView is released from storyboard;
CGFloat
A floating-point number used to represent the image size, coordinates
Cgpoint
CGFloat x, y;
Cgsize
CGFloat width, height;
CGRect
Cgpoint origin; Cgsize size;
Coordinate origin in upper- left corner
CS193P Lecture 7