Separation of function declaration and definition in Swift

后端 未结 5 2116
遥遥无期
遥遥无期 2021-01-06 06:00

I\'m having a look at the new Swift. I come from C, C++, Objective-C... I notice that in swift is not possible (?) to separate the declaration and the definition of function

5条回答
  •  余生分开走
    2021-01-06 06:27

    Yes, it's true that swift doesn't have header files but you can make Xcode generate something similar to this.

    This will give you an overview of the class as you mention.

    On Xcode go to Navigation > Jump to Generated Interface.

    This link should explain a bit more.

提交回复
热议问题