在 Swift 中获取 Objective-C 接口?

在 Swift 中获取 Objective-C 接口?

问题描述:

有没有办法在 swift 中查看可用的 Objective-C 界面?

Is there a way to view the Objective-C interface that are available in swift?

例如,如果我声明了这个 Objective-C 接口:

For example, if I declare this Objective-C interface:

#import <UIKit/UIKit.h>

#define STRING_CONSTANT  @"a_string_constant"
#define BOOL_CONSTANT YES

@interface ViewController : UIViewController
@end

我可以在 Swift 中访问 STRING_CONSTANT,但不能在 BOOL_CONSTANT 中访问.

I can access STRING_CONSTANT in Swift but not BOOL_CONSTANT.

导航 -> 跳转到生成的界面"

"Navigate -> Jump to Generated Interface"