When I created a Swift class, Xcode will add this Swift class into swift.h. But nothing is added in swift.h, still.
Normal swift.h:
SWIFT_CLASS("_TtC8facebook19swiftViewController")
@interface swiftViewController : UIViewController
- (void)viewDidLoad;
- (void)didReceiveMemoryWarning;
- (SWIFT_NULLABILITY(nonnull) instancetype)initWithNibName:(NSString * __nullable)nibNameOrNil bundle:(NSBundle * __nullable)nibBundleOrNil OBJC_DESIGNATED_INITIALIZER;
- (SWIFT_NULLABILITY(nonnull) instancetype)initWithCoder:(NSCoder * __nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
The aforementioned Swift class is, however, not in included my swift.h:
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#pragma clang diagnostic pop
如果使用@objc
声明了Swift类,或者它们是(直接或间接地)从NSObject
派生的,则仅将它们添加到-Swift.h文件中。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.