【问题标题】:Three20 doesn't compile with Xcode 4.5.2 and Xcode 4.6.2Three20 不能与 Xcode 4.5.2 和 Xcode 4.6.2 一起编译
【发布时间】:2013-08-08 04:49:06
【问题描述】:

在 Three20 框架的帮助下,我有一个示例项目。在 xcode 4.4.1 上运行时,它运行良好。在同一个项目中,在 Xcode 4.5.2 和 Xcode 4.6.2 上运行时,我遇到了错误。

some of the errors are :

/three20/src/Three20UI/Sources/UIViewAdditions.m
/three20/src/Three20UI/Sources/UIViewAdditions.m:109:5: Unknown type name '_tapCount'; did you mean 'ItemCount'?
/three20/src/Three20UI/Sources/UIViewAdditions.m:109:15: Expected identifier or '('
/three20/src/Three20UI/Sources/UIViewAdditions.m:110:5: Use of undeclared identifier '_locationInWindow'
/three20/src/Three20UI/Sources/UIViewAdditions.m:111:5: Use of undeclared identifier '_previousLocationInWindow'
/three20/src/Three20UI/Sources/UIViewAdditions.m:113:43: Use of undeclared identifier '_locationInWindow'
/three20/src/Three20UI/Sources/UIViewAdditions.m:114:5: Use of undeclared identifier '_view'; did you mean 'view'?
/three20/src/Three20UI/Sources/UIViewAdditions.m:115:5: Use of undeclared identifier '_window'
/three20/src/Three20UI/Sources/UIViewAdditions.m:116:5: Use of undeclared identifier '_phase'
/three20/src/Three20UI/Sources/UIViewAdditions.m:117:5: Use of undeclared identifier '_touchFlags'
/three20/src/Three20UI/Sources/UIViewAdditions.m:118:5: Use of undeclared identifier '_touchFlags'
/three20/src/Three20UI/Sources/UIViewAdditions.m:119:5: Use of undeclared identifier '_timestamp'
/three20/src/Three20UI/Sources/UIViewAdditions.m:127:3: Use of undeclared identifier '_phase'; did you mean 'phase'?
/three20/src/Three20UI/Sources/UIViewAdditions.m:128:3: Use of undeclared identifier '_timestamp'

【问题讨论】:

  • 就像一个问题:打开 Xcode 4.4.1 并检查 UITouch.h 头文件。你看到那里声明的这些变量了吗?它们没有在 iOS 6.1 头文件中声明,所以我认为它们不再可用(如果它们在 iOS 5.x 的 UITouch.h 文件中,那么这证实了我的理论,但我无权访问它们)。这个框架在 2 年前就被废弃了,所以我不知道你为什么要尝试使用它。此类还严重依赖于实现细节,如果正在积极维护这很好,否则只是破坏的秘诀。

标签: iphone ios xcode4.5 three20


【解决方案1】:

如果您运行的是最新版本,您可能已经定义了DEBUG_TOUCH。取消定义,错误就会消失。

【讨论】:

    猜你喜欢
    • 2012-01-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-08
    • 1970-01-01
    • 1970-01-01
    • 2015-04-25
    相关资源
    最近更新 更多