本文介绍了什么是伞头?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
什么是伞头?有什么用?我收到了一个警告,如下所示。这是什么意思?
What is basically an umbrella header? What is its use? I got a warning as shown below. What does this mean?
<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"
推荐答案
是框架的主头文件。它的用途是你可以写
The umbrella header is the 'master' header file for a framework. Its use is that you can write
#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>
中。也许它不适合你?在这种情况下,添加
For me, <XCTest/XCTestCase+AsynchronousTesting.h>
is included in <XCTest/XCTest.h>
. Maybe it is not for you? In that case, add the
#import <XCTest/XCTestCase+AsynchronousTesting.h>
手动。
这篇关于什么是伞头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!