iOS - Founcation -constants
来源:互联网 发布:贾巴里帕克体测数据 编辑:程序博客网 时间:2024/06/06 20:27
Enumerations 列举
1.NSByteOrder 是由NSHostByteOrder返回
enum _NSByteOrder {
NS_UnknownByteOrder =CFByteOrderUnknown, 未知类型
NS_LittleEndian =CFByteOrderLittleEndian, 小端字节字节顺序。
NS_BigEndian =CFByteOrderBigEndian 大端字节字节顺序。 大端小端 可以网上搜索
};
指定byte-order的格式2.NSNotFound 请求不存在或者是不能被建立
NSNotFound is typically used by various methods and functions that search for items in serial data and return indices, such as characters in a string object orid objects in an NSArray object.
3.NSEnumerationOptions
enum {
NSEnumerationConcurrent = (1UL <<0),
NSEnumerationReverse = (1UL <<1),
};
typedef NSUIntegerNSEnumerationOptions;
4
NSComparisonResult 比较结果
enum {
NSOrderedAscending = -1, 上升
NSOrderedSame,
NSOrderedDescending 下降
};
typedef NSIntegerNSComparisonResult;
5.NSSortOptions
enum {
NSSortConcurrent = (1UL <<0),
NSSortStable = (1UL <<4),
};
typedef NSUIntegerNSSortOptions;
6.
NSQualityOfService
typedef NS_ENUM (NSInteger,
NSQualityOfService ) {
NSQualityOfServiceUserInteractive =0x21,
NSQualityOfServiceUserInitiated =0x19,
NSQualityOfServiceUtility =0x11,
NSQualityOfServiceBackground =0x09,
NSQualityOfServiceDefault = -1
};
7.
NSSearchPathDirectory
enum {
NSApplicationDirectory =1,
NSDemoApplicationDirectory,
NSDeveloperApplicationDirectory,
NSAdminApplicationDirectory,
NSLibraryDirectory,
NSDeveloperDirectory,
NSUserDirectory,
NSDocumentationDirectory,
NSDocumentDirectory,
NSCoreServiceDirectory,
NSAutosavedInformationDirectory =11,
NSDesktopDirectory =12,
NSCachesDirectory =13,
NSApplicationSupportDirectory =14,
NSDownloadsDirectory =15,
NSInputMethodsDirectory =16,
NSMoviesDirectory =17,
NSMusicDirectory =18,
NSPicturesDirectory =19,
NSPrinterDescriptionDirectory =20,
NSSharedPublicDirectory =21,
NSPreferencePanesDirectory =22,
NSItemReplacementDirectory =99,
NSAllApplicationsDirectory =100,
NSAllLibrariesDirectory =101,
};
typedef NSUIntegerNSSearchPathDirectory;
8.NSSearchPathDomainMask
enum {
NSUserDomainMask =1,
NSLocalDomainMask =2,
NSNetworkDomainMask =4,
NSSystemDomainMask =8,
NSAllDomainsMask =0x0ffff,
};
typedef NSUIntegerNSSearchPathDomainMask;
9.NSError Codes
NSError codes in the Cocoa error domain.
enum {
NSFileNoSuchFileError =4,
NSFileLockingError =255,
NSFileReadUnknownError =256,
NSFileReadNoPermissionError =257,
NSFileReadInvalidFileNameError =258,
NSFileReadCorruptFileError =259,
NSFileReadNoSuchFileError =260,
NSFileReadInapplicableStringEncodingError =261,
NSFileReadUnsupportedSchemeError =262,
NSFileReadTooLargeError =263,
NSFileReadUnknownStringEncodingError =264,
NSFileWriteUnknownError =512,
NSFileWriteNoPermissionError =513,
NSFileWriteInvalidFileNameError =514,
NSFileWriteFileExistsError =516,
NSFileWriteInapplicableStringEncodingError =517,
NSFileWriteUnsupportedSchemeError =518,
NSFileWriteOutOfSpaceError =640,
NSFileWriteVolumeReadOnlyError =642,
NSKeyValueValidationError =1024,
NSFormattingError =2048,
NSUserCancelledError =3072,
NSFeatureUnsupportedError =3328,
NSFileErrorMinimum =0,
NSFileErrorMaximum =1023,
NSValidationErrorMinimum =1024,
NSValidationErrorMaximum =2047,
NSFormattingErrorMinimum =2048,
NSFormattingErrorMaximum =2559,
NSPropertyListReadCorruptError =3840,
NSPropertyListReadUnknownVersionError =3841,
NSPropertyListReadStreamError =3842,
NSPropertyListWriteStreamError =3851,
NSPropertyListErrorMinimum =3840,
NSPropertyListErrorMaximum =4095
NSExecutableErrorMinimum =3584,
NSExecutableNotLoadableError =3584,
NSExecutableArchitectureMismatchError =3585,
NSExecutableRuntimeMismatchError =3586,
NSExecutableLoadError =3587,
NSExecutableLinkError =3588,
NSExecutableErrorMaximum =3839,
}
10.
URL Loading System Error Codes
enum
{
NSURLErrorUnknown = -1,
NSURLErrorCancelled = -999,
NSURLErrorBadURL = -1000,
NSURLErrorTimedOut = -1001,
NSURLErrorUnsupportedURL = -1002,
NSURLErrorCannotFindHost = -1003,
NSURLErrorCannotConnectToHost = -1004,
NSURLErrorDataLengthExceedsMaximum = -1103,
NSURLErrorNetworkConnectionLost = -1005,
NSURLErrorDNSLookupFailed = -1006,
NSURLErrorHTTPTooManyRedirects = -1007,
NSURLErrorResourceUnavailable = -1008,
NSURLErrorNotConnectedToInternet = -1009,
NSURLErrorRedirectToNonExistentLocation = -1010,
NSURLErrorBadServerResponse = -1011,
NSURLErrorUserCancelledAuthentication = -1012,
NSURLErrorUserAuthenticationRequired = -1013,
NSURLErrorZeroByteResource = -1014,
NSURLErrorCannotDecodeRawData = -1015,
NSURLErrorCannotDecodeContentData = -1016,
NSURLErrorCannotParseResponse = -1017,
NSURLErrorInternationalRoamingOff = -1018,
NSURLErrorCallIsActive = -1019,
NSURLErrorDataNotAllowed = -1020,
NSURLErrorRequestBodyStreamExhausted = -1021,
NSURLErrorFileDoesNotExist = -1100,
NSURLErrorFileIsDirectory = -1101,
NSURLErrorNoPermissionsToReadFile = -1102,
NSURLErrorSecureConnectionFailed = -1200,
NSURLErrorServerCertificateHasBadDate = -1201,
NSURLErrorServerCertificateUntrusted = -1202,
NSURLErrorServerCertificateHasUnknownRoot = -1203,
NSURLErrorServerCertificateNotYetValid = -1204,
NSURLErrorClientCertificateRejected = -1205,
NSURLErrorClientCertificateRequired = -1206,
NSURLErrorCannotLoadFromNetwork = -2000,
NSURLErrorCannotCreateFile = -3000,
NSURLErrorCannotOpenFile = -3001,
NSURLErrorCannotCloseFile = -3002,
NSURLErrorCannotWriteToFile = -3003,
NSURLErrorCannotRemoveFile = -3004,
NSURLErrorCannotMoveFile = -3005,
NSURLErrorDownloadDecodingFailedMidStream = -3006,
NSURLErrorDownloadDecodingFailedToComplete = -3007
}
11.iCloud Error Codes
NSUbiquitousFileErrorMinimum =4352,
NSUbiquitousFileUnavailableError =4353,
NSUbiquitousFileNotUploadedDueToQuotaError =4354,
NSUbiquitousFileUbiquityServerNotAvailable =4355,
NSUbiquitousFileErrorMaximum =4607
12.XPC Errors
NSXPCConnectionInterrupted =4097,
NSXPCConnectionInvalid =4099,
NSXPCConnectionReplyInvalid =4101,
NSXPCConnectionErrorMinimum =4096,
NSXPCConnectionErrorMaximum =4224
Global Variables
1.Cocoa Error Domain
NSString *constNSCocoaErrorDomain;
2.NSURL Domain
extern NSString *const NSURLErrorDomain;
Numeric Constants
1.NSDecimal Constants
#define NSDecimalMaxSize (8)
#define NSDecimalNoScale SHRT_MAX
2.NSInteger and NSUInteger Maximum and Minimum Values
#define NSIntegerMax LONG_MAX
#define NSIntegerMin LONG_MIN
#define NSUIntegerMax ULONG_MAX
Exceptions
1.General Exception Names
extern NSString *NSGenericException;
extern NSString *NSRangeException;
extern NSString *NSInvalidArgumentException;
extern NSString *NSInternalInconsistencyException;
extern NSString *NSMallocException;
extern NSString *NSObjectInaccessibleException;
extern NSString *NSObjectNotAvailableException;
extern NSString *NSDestinationInvalidException;
extern NSString *NSPortTimeoutException;
extern NSString *NSInvalidSendPortException;
extern NSString *NSInvalidReceivePortException;
extern NSString *NSPortSendException;
extern NSString *NSPortReceiveException;
extern NSString *NSOldStyleException;
Version Numbers
1.Foundation Version Number2.Foundation Framework Version Numbers
- iOS - Founcation -constants
- constants
- Constants
- 我的iOS开发之Objective-C第5、6天之Founcation
- Java constants
- 17.3 Constants
- 17.3 Constants
- C++ constants
- TAAL3 Constants
- literal constants
- 常量Constants
- struts2 Constants
- ADO enumeration constants
- Constants 城市代码转换
- Windows Message ID constants
- Constants and fields
- PHP Predefined Constants
- WMI Error Constants
- New Blog:louchaooo.github.io
- python标准库:正则(re)
- poj 3320 Jessica's Reading Problem (尺取法+记录数据方式)
- 创建内核设备树(TI TRM)
- nginx和ftp
- iOS - Founcation -constants
- viewController调试不走deinit方法(个人记录)
- 算法与数据结构实验题1.2 青子的生日
- 总起篇
- Sonatype Nexus2.0.6介绍与安装
- DotNet 资源大全中文版
- Android Contacts之二根据4.4实现的联系人列表特效
- 正义使者——医疗黑客自制Epipen,让普通人获得垄断药
- iOS:省市联动的实现以及BUG的解决