What is the significance of #pragma marks? Why do we need #pragma marks?

前端 未结 7 1390
耶瑟儿~
耶瑟儿~ 2021-01-29 17:21

What is the purpose of #pragma marks in Xcode? Does their location in .m files matter? Should some #pragma come before all others?

7条回答
  •  不知归路
    2021-01-29 18:13

    #pragma mark directives show up in Xcode in the menus for direct access to methods. They have no impact on the program at all.

    For example, using it with Xcode 4 will make those items appear directly in the Jump Bar.

    There is a special pragma mark - which creates a line.

    enter image description here

提交回复
热议问题