Viewing the interface of your swift code, three ways to view the header files of swift codes

Source: Internet
Author: User

? Technical Q&a qa1914viewing The interface of your Swift CODEQ:? How does I view the interface of my Swift code in Xcode?

Q: How do I view the header files for swift files in Xcode?


A:? Xcode generates an interface file, includes all your source code ' s internal and public declarations when using the Istant Editor button, the Navigate menu, or the Generated Interface feature.?

?

First method: Using The Assistant editor button

    1. Select your Swift file in the Project navigator.

    2. Click The Assistant Editor button in the Xcode toolbar as shown in? Figure 1.

Figure 1?? Viewing the ListItem file in the Project navigator. The numbers correspond to the steps above.

Xcode automatically shows the generated interface for your Swift code in its Assistant Editor pane using the counterparts Mode as shown in? Figure 2.?

Figure 2?? Viewing the interface of ListItem in the Assistant Editor pane

Back to Top

The second method using the Navigate menu
    1. Select your Swift file in the Project navigator.

    2. Choose Navigate > Jump to Generated Interface as shown in? Figure 3, to view your code ' s interface.

Figure 3?? Select jump to Generated Interface to view the Interface of ListItem. The numbers correspond to the steps above.

Note:? To the your original Swift code, choose Navigate > Jump to original Source "<your_filename>.swift" as sh Own in? Figure 4.

?

Figure 4?? Switch back to the Swift file associated with the ListItem interface

Back to Top

The third method using the Generated Interface feature
    1. click the related Items button in the editor's Jump bar.

    2. xcode displays a contextual menu. Choose Generated Interface as shown in?figure 5 To view your code ' s interface.

Figure 5?? Select Generated Interface to view the Interface of ListItem. The numbers correspond to the steps above.

Note:? To go your original Swift code, choose Original Source with the above contextual menu as shown in? Figure 6.

?

Figure 6?? Switch back to the Swift file associated with the ListItem interface

Back to Top

?

Document Revision History

?

Date Notes
2016-03-23

New document that describes how to view the interface of your Swift code.

?

?

?


Copyright? Apple INC. All rights Reserved.? Terms of use?|?? Privacy policy?| Updated:2016-03-23

?? Feedback?

Viewing the interface of your swift code, three ways to view the header files of swift codes

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.