页眉。不适用于文档。不是页脚的反义词。
theos/vendor/includeHeaders included with Theos for easy compilation of most projects out of the box.
Please send us headers you’ve put together that would be useful to the wider community. Be aware that we are looking for “clean” headers, not generated output from class-dump or a similar tool.
Create headers only for what you use.
Follow the existing coding style.
@property (attributes) type name;- (type)methodName:(type)variableName parameter:(type)name;NSDictionary *> *variableC functions and variables (all symbols) should be declared using FOUNDATION_EXPORT
#import
FOUNDATION_EXPORT int ExternalVariable;
FOUNDATION_EXPORT const int ExternalConstant;
FOUNDATION_EXPORT void ExternalFunction(int param);Initialisers and singleton (e.g. sharedInstance) methods should return instancetype.
Don't just copy and paste lines from class-dumps - replace id with the appropriate class. Also change arg1 and the like, or in some cases class-dump-z’s guessed argument names, to something more appropriate. If you don’t know the type, Cycript or FLEX can be helpful:
$ cycript -p SpringBoard
cy# [SBBaconController sharedInstance].baconCurrentlyBeingEaten.class
@"SBBacon"Additionally, ensure the appropriate types are used. The most common ones are:
float and double should usually become CGFloat or NSTimeIntervalint and long should usually become NSIntegerunsigned int and unsigned long should usually become NSUIntegerThis is especially important when using the headers as reference for hooking. An incorrect Objective-C type encoding can cause problems.
Import all relevant public SDK headers for types used in the header. This usually means using #import or #import . For private types, prefer to use @class and @protocol. If not possible, for instance for subclassing and protocol conformance, import the private header defining the type.
For compatibility, prefer classic imports for modules:
// Do:
#import
#import
// Don’t:
@import Foundation;
@import ObjectiveC.runtime; If modules are supported by the compiler, #import of headers from a module will be translated to equivalent @import statements.
Any headers under an OSI-approved license can be included here. Please add its license to LICENSE.md.
openssl, libarchive, etc)暂无开放 Issues,或尚未同步最近议题。