iOS Learning notes----15/09/02

Source: Internet
Author: User

1. Three ways of listening:

    1. Addtarget method;
    2. Use of proxy methods;
    3. [[Nsnotificationcenter Defaultcenter] Addobserver] method monitoring notification;

2. When storyboard delete the original Viewcontroller and then add Navigationcontroller, it is not automatically set to initial View Controller, it needs to be set manually.

The 3.push method is deprecated and the Show method is now equivalent to the previous push.

4. If you use the button to drag the line to another viewcontroller, it is automatically executed. and the Controller and controller to establish segue, you need to set the Sugue identifier, and then need in the source controller class method to call the controller's Performseguewithidentifier method can also be implemented jump. The latter can do some validation before transmission.

5.performseguewithidentifier:sender: The complete execution of a method

    1. According to identifier to find the corresponding line in the storyboard, create a new Uistoryboardsegue object
    2. Set the Sourceviewcontroller of the Segue object (source Controller)
    3. New and set Destinationviewcontroller (target controller) for the Segue object
    4. Call Sourceviewcontroller (void) Prepareforsegue: (Uistoryboardsegue *) Segue Sender: (ID) Sender method, Do some pre-jump prep work and pass in the created Segue object
    5. Call the-(void) Perform of the Segue object; method starts to perform interface jump operation
    6. Get the Uinavigationcontroller where Sourceviewcontroller is located
    7. Call Uinavigationcontroller's push method to press the Destinationviewcontroller into the stack to complete the jump

Hair late, the recent life of more trouble, make head a bit faint, originally also want to learn something in three days vacation, it is very sad.

iOS Learning notes----15/09/02

Related Article

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.