17
HIREVIETNAMESE iPhone Training Lesson 3

HireVietnamese - Lesson 3

  • Upload
    le-ly

  • View
    487

  • Download
    1

Embed Size (px)

Citation preview

HIREVIETNAMESE

iPhone TrainingLesson 3

HIREVIETNAMESEhttp://www.hirevietnamese.com HIREVIETNAMESE

Contents

Drawing1

Touch and input2

Example 34

Exercise 35

2

HIREVIETNAMESEhttp://www.hirevietnamese.com HIREVIETNAMESE

Drawing

Quartz 2D Quartz 2D is a two dimensional graphics drawing engine that

makes up the bulk of the UIKit Core Graphics Framework. It is a C based application programming interface (API) and as

such is utilized primarily through calls to a range of C functions. Quartz 2D drawing typically takes place on a UIView object.

3

HIREVIETNAMESEhttp://www.hirevietnamese.com HIREVIETNAMESE

Drawing

Drawing a line

4

HIREVIETNAMESEhttp://www.hirevietnamese.com HIREVIETNAMESE

Drawing

Drawing a line

5

HIREVIETNAMESEhttp://www.hirevietnamese.com HIREVIETNAMESE

Drawing

Drawing paths

6

HIREVIETNAMESEhttp://www.hirevietnamese.com HIREVIETNAMESE

Drawing

Drawing paths

7

HIREVIETNAMESEhttp://www.hirevietnamese.com HIREVIETNAMESE

Drawing

Drawing Rectangle

8

HIREVIETNAMESEhttp://www.hirevietnamese.com HIREVIETNAMESE

Drawing

Drawing Rectangle

9

HIREVIETNAMESEhttp://www.hirevietnamese.com HIREVIETNAMESE

Drawing

Filling a path with a color

10

HIREVIETNAMESEhttp://www.hirevietnamese.com HIREVIETNAMESE

Drawing

Filling a path with a color

11

HIREVIETNAMESEhttp://www.hirevietnamese.com HIREVIETNAMESE

Drawing

Drawing an image into Graphic Context

12

HIREVIETNAMESEhttp://www.hirevietnamese.com HIREVIETNAMESE

Drawing

Filling a path with a color

13

HIREVIETNAMESEhttp://www.hirevietnamese.com HIREVIETNAMESE

Touch and input

Events touchesBegan:withEvent: touchesEnded:withEvent: touchesMoved:withEvent:

Get all touches on the screen NSSet *allTouches = [event allTouches];

14

HIREVIETNAMESEhttp://www.hirevietnamese.com HIREVIETNAMESE

Example 3

15

HIREVIETNAMESEhttp://www.hirevietnamese.com HIREVIETNAMESE

Exercise 3

16

HIREVIETNAMESE