I am getting an error:
Error: Lexical or Preprocessor Issue: 'Constants.h' file not found
When the code is run, the issue disappears and the app works fine.
How can I fix this?
two things:
This involves using forward declarations whenever possible in headers (only #include another header if you are extending the class or implementing a protocol in that header). Use forward declarations for classes and protocols in your headers; then do the actual #import in your .m files.
@class SomeTypeINeedWhichIsAClass;
@protocol SomeProtocolWhichIsUsedInMyMethodSignatures;
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.