#pragma mark not showing in methods in Xcode 4.0

前端 未结 13 1929
死守一世寂寞
死守一世寂寞 2021-01-01 13:16

In Xcode Version 4.0 I notice that #pragma marks within methods are no longer showing up in the Jump Bar. The only #pragma marks that are showing up are those that are betwe

13条回答
  •  感动是毒
    2021-01-01 13:28

    I encountered the same problem. I now insert a dummy method after @implementation ... and before the first 'real' method. I define this method in the project's ...-Prefic.pch file so it does not show up in the Jump Bar.

    Add the following to your ...-Prefix.pch:

    #define PLEASE_LET_PRAGMA_MARK_WORK - (void) pleaseLetPragmaMarkWork {}
    

    And insert the request in your omplementations:

    @implementation anyClass
    
    PLEASE_LET_PRAGMA_MARK_WORK
    
    #pragma mark - This will show up.
    

    Works like a charm.

提交回复
热议问题