什么是伞头?它的用途是什么?我收到如下所示的警告。这是什么意思?
<module-includes>:1:1: warning: umbrella header for module 'XCTest' does not include header 'XCTextCase+AsynchronousTesting.h' [-Wincomplete-umbrella]
#import "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTest.h"
最佳答案
umbrella header是框架的“主”头文件。它的用途是你可以写
#import <UIKit/UIKit.h>
而不是
#import <UIKit/UIViewController.h>
#import <UIKit/UILabel.h>
#import <UIKit/UIButton.h>
#import <UIKit/UIDatePicker.h>
等等。
对我来说,<XCTest/XCTestCase+AsynchronousTesting.h>
包含在 <XCTest/XCTest.h>
中.也许它不适合你?在这种情况下,添加
#import <XCTest/XCTestCase+AsynchronousTesting.h>
手动。
关于ios - 什么是伞头?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31238761/