iOS 基础函数解析 - Foundation Functions Reference

iOS 基础函数解析 - Foundation Functions Reference

太阳火神的美丽人生 (http://blog.csdn.net/opengl_es)

本文遵循“署名-非商业用途-保持一致”创作公用协议

转载请保留此句:太阳火神的美丽人生 -  本博客专注于 敏捷开发及移动和物联设备研究:iOS、Android、Html5、Arduino、pcDuino否则,出自本博客的文章拒绝转载或再转载,谢谢合作。


Foundation Functions Reference

Framework
Foundation/Foundation.h
Declared in
NSBundle.h
NSByteOrder.h
NSDecimal.h
NSException.h
NSObjCRuntime.h
NSObject.h
NSPathUtilities.h
NSRange.h
NSZone.h

Overview

This chapter describes the functions and function-like macros defined in the Foundation Framework.

Functions by Task

Assertions

For additional information about Assertions, see Assertions and Logging Programming Guide.

  • NSAssert
  • NSAssert1
  • NSAssert2
  • NSAssert3
  • NSAssert4
  • NSAssert5
  • NSCAssert
  • NSCAssert1
  • NSCAssert2
  • NSCAssert3
  • NSCAssert4
  • NSCAssert5
  • NSCParameterAssert
  • NSParameterAssert

Bundles

For additional information on generating strings files see “Using Strings Files for User-Facing Text” in Internationalization Programming Topics.

  • NSLocalizedString
  • NSLocalizedStringFromTable
  • NSLocalizedStringFromTableInBundle
  • NSLocalizedStringWithDefaultValue

Byte Ordering

  • NSConvertHostDoubleToSwapped
  • NSConvertHostFloatToSwapped
  • NSConvertSwappedDoubleToHost
  • NSConvertSwappedFloatToHost
  • NSHostByteOrder
  • NSSwapBigDoubleToHost
  • NSSwapBigFloatToHost
  • NSSwapBigIntToHost
  • NSSwapBigLongLongToHost
  • NSSwapBigLongToHost
  • NSSwapBigShortToHost
  • NSSwapDouble
  • NSSwapFloat
  • NSSwapHostDoubleToBig
  • NSSwapHostDoubleToLittle
  • NSSwapHostFloatToBig
  • NSSwapHostFloatToLittle
  • NSSwapHostIntToBig
  • NSSwapHostIntToLittle
  • NSSwapHostLongLongToBig
  • NSSwapHostLongLongToLittle
  • NSSwapHostLongToBig
  • NSSwapHostLongToLittle
  • NSSwapHostShortToBig
  • NSSwapHostShortToLittle
  • NSSwapInt
  • NSSwapLittleDoubleToHost
  • NSSwapLittleFloatToHost
  • NSSwapLittleIntToHost
  • NSSwapLittleLongLongToHost
  • NSSwapLittleLongToHost
  • NSSwapLittleShortToHost
  • NSSwapLong
  • NSSwapLongLong
  • NSSwapShort

Decimals

You can also use the class NSDecimalNumber for decimal arithmetic.

  • NSDecimalAdd
  • NSDecimalCompact
  • NSDecimalCompare
  • NSDecimalCopy
  • NSDecimalDivide
  • NSDecimalIsNotANumber
  • NSDecimalMultiply
  • NSDecimalMultiplyByPowerOf10
  • NSDecimalNormalize
  • NSDecimalPower
  • NSDecimalRound
  • NSDecimalString
  • NSDecimalSubtract

Exception Handling

You can find the following macros implemented in NSException.h. They are obsolete and should not be used. See Exception Programming Topics for information on how to handle exceptions.

  • NS_DURING
  • NS_ENDHANDLER
  • NS_HANDLER
  • NS_VALUERETURN
  • NS_VOIDRETURN

Managing Object Allocation and Deallocation

  • NSAllocateObject
  • NSCopyObject
  • NSDeallocateObject
  • NSDecrementExtraRefCountWasZero
  • NSExtraRefCount
  • NSIncrementExtraRefCount
  • NSShouldRetainWithZone

Interacting with the Objective-C Runtime

  • NSGetSizeAndAlignment
  • NSClassFromString
  • NSStringFromClass
  • NSSelectorFromString
  • NSStringFromSelector
  • NSStringFromProtocol
  • NSProtocolFromString

Logging Output

  • NSLog
  • NSLogv

Managing File Paths

  • NSFullUserName
  • NSHomeDirectory
  • NSHomeDirectoryForUser
  • NSOpenStepRootDirectory
  • NSSearchPathForDirectoriesInDomains
  • NSTemporaryDirectory
  • NSUserName

Managing Ranges

  • NSEqualRanges
  • NSIntersectionRange
  • NSLocationInRange
  • NSMakeRange
  • NSMaxRange
  • NSRangeFromString
  • NSStringFromRange
  • NSUnionRange

Uncaught Exception Handlers

Whether there’s an uncaught exception handler function, any uncaught exceptions cause the program to terminate, unless the exception is raised during the posting of a notification.

  • NSGetUncaughtExceptionHandler
  • NSSetUncaughtExceptionHandler

Core Foundation ARC Integration

  • CFBridgingRetain
  • CFBridgingRelease

Managing Memory

  • NSAllocateMemoryPages
  • NSCopyMemoryPages
  • NSDeallocateMemoryPages
  • NSLogPageSize
  • NSPageSize
  • NSRealMemoryAvailable
  • NSRoundDownToMultipleOfPageSize
  • NSRoundUpToMultipleOfPageSize
  • NSMakeCollectable

Managing Zones

Zones are ignored on iOS and 64-bit runtime on OS X. You should not use zones in current development.

  • NSCreateZone
  • NSRecycleZone
  • NSSetZoneName
  • NSZoneCalloc
  • NSZoneFree
  • NSZoneFromPointer
  • NSZoneMalloc
  • NSZoneName
  • NSZoneRealloc
  • NSDefaultMallocZone

Copyright © 2014 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2014-04-09


你可能感兴趣的:(iOS 基础函数解析 - Foundation Functions Reference)