Xcode - Using #pragma mark

后端 未结 2 654
梦毁少年i
梦毁少年i 2021-02-05 05:42

I\'m pretty sure this isn\'t a duplicate. Do you use #pragma mark? I\'ve seen multiple ways, which is correct?

#pragma mark -
#pragma mark === Actions ===
#pragm         


        
2条回答
  •  一向
    一向 (楼主)
    2021-02-05 06:39

    There is no "Correct" way, it is annotation, so how you use it is a coding style issue.

    Having said that, I do:

    #pragma mark -
    #pragma mark Actions
    

    Because that causes the popup menu in the Xcode editor group the title and the methods inside of the same divider.

提交回复
热议问题