作者热门文章
- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我有一个使用 swift 类对象的类名 AppState
#import "Sonic-Swift.h"
@interface AppState : NSObject
@property (class) NSMutableArray<"Swift class" *> *entity;
现在我需要在 swift 文件中使用这个类 (AppState
)。所以我试图在桥接 header 中导入此类。
但在导入此文件后,应用程序会在“#import “Sonic-Swift.h””行“找不到文件”中给出错误。
failed to emit precompiled header '/Users/krishna_mac_2/Library/Developer/Xcode/DerivedData/Apps-gqelclyzwvyomhcchmjjsejrznaw/Build/Intermediates.noindex/PrecompiledHeaders/Sonic-Bridging-Header-swift_3RJ3MQEOEFTPD-clang_26Q2UBYWMY12Y.pch' for bridging header '/Users/krishna_mac_2/Documents/Documents/Documents/Documents/Documents/Github/Sonic/iOS/Sonic/Sonic-Bridging-Header.h'
最佳答案
import "Sonic-Swift.h"
应该只在 .m
文件中。
如果你想在 .h
文件中使用 Swift 类,那么你应该使用
@class MySwiftClass;
关于ios - 找不到 Objective C 桥接头文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50507433/
我正在尝试制作一个动画角色,可以在不移动他的躯干的情况下伸手去拿屏幕上的东西。 如果他够不到,他的手应该朝这个方向移动最大量,然后被他的静态躯干的物理限制所抵消。 所以在我的代码中,绿色矩形( han
似乎有很多关于 Vulkan 新图形 API 的讨论 - https://www.khronos.org/vulkan 我的问题与 - 现有的 EGL 接口(interface)将如何适应 Vulka
首先,感谢@Smick 提供此处发布的初始车辆代码: Sprite Kit pin joints appear to have an incorrect anchor 我正在尝试在车轮(左轮)和底盘之
我是一名优秀的程序员,十分优秀!