iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
Cwind
V2EX  ›  iDev

Xcode碰到的奇怪问题

  •  
  •   Cwind · Oct 7, 2012 · 4138 views
    This topic created in 4986 days ago, the information mentioned may be changed or developed.
    先上图:
    事情经过是这样的:
    我之前在HandTheArrayNeedToDraw这个类里定义了一个方法:
    + (NSArray *)arrayNeedToDraw:(NSString *)name inManageObjectContext:(NSManagedObjectContext *)context;
    7 replies    1970-01-01 08:00:00 +08:00
    Cwind
        1
    Cwind  
    OP
       Oct 7, 2012
    ⊙﹏⊙ 不小心按到快捷键发出去了……
    接上文:
    后来我把这个方法改了,变成
    + (NSArray *)arrayNeedToDraw:(NSString *)name andCreatDate:(NSDate *)dateCreat inManageObjectContext:(NSManagedObjectContext *)context;
    然后开始报错,但是报错内容是关于前面那个方法非法的,非常奇怪,即便我把这一段全删掉还是会报这个错误。
    之后我尝试Shift+Command+k,如此一来报错倒是不会了,但是那个黄色的警告却还是没消失。
    有前辈知道这是什么问题吗?
    hldm723
        2
    hldm723  
       Oct 7, 2012
    指针没用过
    Cwind
        3
    Cwind  
    OP
       Oct 7, 2012
    @hldm723 这里array我是还没用过,所以会有后面那个警告,但是我的问题是前面那一个莫名其妙的警告。事实上就算后面把用了array,前面那个警告还是不会消失……
    lldong
        4
    lldong  
       Oct 7, 2012   ❤️ 1
    rm -r ~/Library/Developer/Xcode/DerivedData 试试看?
    Cwind
        5
    Cwind  
    OP
       Oct 7, 2012
    @lldong 问题解决了,十分感谢,请问大概为什么会出现这种问题呢?
    lldong
        6
    lldong  
       Oct 7, 2012   ❤️ 2
    一个很讨厌的bug,有时Xcode对代码做分析的缓存没有及时更新就会这样,会出现莫名其妙的报错,代码高亮或代码补全失效,删掉让它重新indexing就可以了,在organizer里面的project那栏里面也可以删
    Cwind
        7
    Cwind  
    OP
       Oct 7, 2012
    @lldong 学习了,再次感谢:D
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5208 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 03:55 · PVG 11:55 · LAX 20:55 · JFK 23:55
    ♥ Do have faith in what you're doing.