iOS Learning essay Three

Source: Internet
Author: User

 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.