Swift UI Special training 5 Custom View Controller

Source: Internet
Author: User

We have now added two scenarios, although we have the default view controller, but we would like to customize our own controller, we have been working on the storyboard, and now some code.

Right-click New fie in the project catalog, select Cocoa Touch Class in source for iOS, set such as:


Click Next and you can see that Xcode has created a class that inherits the Uiviewcontroller:



Check the new restaurant's Viewcontroller, then select the class editor on the right, choose our own class in the custom class, and then turn it into our own class to take over.


Now the same custom restaurant ranks the controller for this scene, unlike the controller type is Uitableviewcontroller.




Swift UI Special training 5 Custom View Controller

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.