ios storyboard do interface Jump design page: self.dismissviewcontrolleranimated (True, Completion:nil) iOS8 has replaced the old method. Definition Interface design using two parameters dismissviewcontrolleranimatednib: Self.presentviewcontroller (Myviewcontroller (nibname: "Myviewcontroller", Bundle:nil), Animated:true, Completion:nil) Myviewconroller is the Uiviewcontroller sub-class that you build, The first step in generating the nib file ios drawing API1 is to declare a var context = Uigraphicsgetcurrentcontext ();//To save the current drawing content 2 can be Cgcontextaddlinetopoint draw Straight line the line needs to first determine a point----cgcontextmovetopoint through CGContextAddRect draw a rectangle through Cgcontextaddarc The fan-----"and the circle draws a rectangular inner circle ——— ellipse and circle through the cgcontextdrawimage to render the picture to the view, The first place to put the diagram through cgcontextscalectm//is reversed, and the image and the attempted encoding cause Y to be -13cgcontextset and other methods to set the properties of these images such as color and wireframe 4 display graphics, Show lines through Cgcontextstrokepath (context), fill drawing by Cgcontextfillpath (context)//In order not to affect other drawings at the time of drawing, save state before restoring cgcontextsavegstate (context) Cgcontextrestoregstate (context) 2-13 artboard instances first overloaded with two methods touchEsbegan (Touches:nsset, withevent event:uievent) {//Determine the start point of the touch var p = touches.anyobject ()?. Locationinview (self) cgpathmovetopoint (path, nil, p!. X, p!. Y)}touchesmoved (Touches:nsset, withevent event:uievent) {var p = touches.anyobject ()?. Locationinview (self) cgpathaddlinetopoint (path, nil, p!. X, p!. Y) setneedsdisplay ();//display graphics }
iOS Learning essay Three