#pragma mark not showing in methods in Xcode 4.0

前端 未结 13 1887
死守一世寂寞
死守一世寂寞 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:33

    user1639164 - At the risk of being pedantic, I'd say you're "95%" correct. I found it is possible to get Xcode to display a pragma before your first method. If the first chunk of code in a source file happens to be a regular procedure rather than a method, then you will get the pragma showing up. E.g.

    NSString * localizedString (NSString * key)
    {
    // My code here…
    }
    
    # pragma mark - app-delegate startup
    
    - (id) init
    {
      self = [super init];
      if (self)… etc
    

    This is an extract from my boilerplate app delegate code. In this case, you will see the pragma show up before the first method. But not before your first chunk of code! :-) So it's as if the pragma parsing machinery can't get its ass in gear until it's seen at least one routine - method or otherwise. As you say, hope it's fixed soon.

提交回复
热议问题