Xcode 4: Auto-complete & Jump to Definition broken in my Xcode 3 Project

前端 未结 15 995
时光说笑
时光说笑 2021-01-30 09:11

My project was created in Xcode 3, I\'m opening it in Xcode 4 and notice the following:

  • \'Jump to Definition\' no longer works with my own symbols
15条回答
  •  臣服心动
    2021-01-30 09:32

    I had this exact same issue. I have a project with a bunch of ViewControllers that extend a class I'm calling BaseViewController. I added the following code to BaseViewController.h and syntax coloring and code autocomplete broke! Even with repeated deletions of derived data the problem was still there. I can't believe it!!

    @implementation UIView (FindFirstResponder)
    - (UIView *)findFirstResponder
    {
        if (self.isFirstResponder) {
            return self;
        }
    
        for (UIView *subView in self.subviews) {
            UIView *firstResponder = [subView findFirstResponder];
    
            if (firstResponder != nil) {
                return firstResponder;
            }
        }
    
        return nil;
    }
    @end
    

    Commenting out this code solved my issues! I have XCode Version 4.4.1 (4F1003)

提交回复
热议问题