Foundation Framework Classes

  • Data Storage:

   NSData provides object-oriented storage for arrays of bytes.

   NSValue and NSNumber provide object-oriented storage for arrays of simple C data values.

   NSArrayNSDictionary, and NSSet provide storage for Objective-C objects of any class.

See Number and Value Programming Topics and Collections Programming Topics for more information.

  • Text and Strings:

The NSString and NSMutableString classes represent text strings and provide methods for searching, combining, and comparing strings.

An NSScanner object is used to scan numbers and words from an NSString object.

    NSCharacterSet represents various groupings of characters that are used by NSString and NSScanner.

See String Programming Guide for more information.

  • Dates and Times:

The NSDateNSTimeZone, and NSCalendar classes store times and dates and represent calendrical information. They offer methods for calculating date and time differences.

Together with NSLocale, they provide methods for displaying dates and times in many formats, and for adjusting times and dates based on location in the world.

See Date and Time Programming Guide for more information.

  • Sorting and Filtering:

Collections of Objective-C objects, such as NSArrayNSDictionary, and NSSet, can be filtered by an NSPredicate object, and sorted by one or more NSSortDescriptor objects.

See Sort Descriptor Programming Topics and Predicate Programming Guide for more information.

  • Application Coordination and Timing:

    NSNotificationNSNotificationCenter, and NSNotificationQueue provide systems that an object can use to notify all interested observers of changes that occur.

You can use an NSTimer object to send a message to another object at specific intervals.

See Notification Programming Topics for more information.

  • Object Distribution and Persistence:

The data that an object contains can be represented in an architecture-independent way usingNSPropertyListSerialization and NSJSONSerialization.

The NSCoder class and its subclasses take this process a step further by allowing class information to be stored along with the data. The resulting representations are used for archiving and for object distribution.

See Archives and Serializations Programming Guide for more information.

  • Operating-System Services:

Several classes are designed to insulate you from the idiosyncrasies of various operating systems.

   NSFileManager provides a consistent interface for file operations (creating, renaming, deleting, and so on).

   NSThread and NSProcessInfo let you create multithreaded applications and query the environment in which an application runs.

See File System Programming Guide for more information.

  • URL Loading System:

A set of classes and protocols that allow your app to access content referenced by a URL, as represented by the NSURL class.

   NSURLRequest and NSURLResponse objects represent requests and responses sent and received by an NSURLSession object. Additional functionality is provided by helper classes,

including NSURLProtocol for protocol support, NSURLAuthenticationChallenge and NSURLCredentialStoragefor authentication and credentials,

   NSHTTPCookieStorage for cookie storage, and NSURLCache for cache management.

See URL Session Programming Guide for more information.

Value Object

1.NSAffineTransform (2015-12-08)

NSAffineTransform class is available in Cocoa framework for the Mac OS X development. And CGAffineTransform class is available in the Cocoa Touch framework for the iOS application development. If you implementing application in iOS Use CGAffineTransform

2.NSCalendar (2015-12-08)

Calendars encapsulate information about systems of reckoning time in which the beginning, length, and divisions of a year are defined. They provide information about the calendar and support for calendrical computations such as determining the range of a given calendrical unit and adding units to a given absolute time.
NSCalendar is “toll-free bridged” with its Core Foundation counterpart, CFCalendarRef. See Toll-Free Bridging for more information on toll-free bridging herf1 herf2

3.NSCache (2015-12-08)

An NSCache object is a collection-like container, or cache, that stores key-value pairs, similar to the NSDictionary class. Developers often incorporate caches to temporarily store objects with transient data tha-t are expensive to create. Reusing these objects can provide performance benefits, because their values do not have to be recalculated. However, the objects are not critical to the application and can be discard-ed if memory is tight. If discarded, their values will have to be recomputed again when needed.

4.NSData(2015-12-09)

NSData and its mutable subclass NSMutableData provide data objects, object-oriented wrappers for byte buffers. Data objects let simple allocated buffers (that is, data with no embedded pointers) take on the behavior of Foundation objects.
NSData creates static data objects, and NSMutableData creates dynamic data objects. NSData and NSMutableData are typically used for data storage and are also useful in Distributed Objects applications, where datacontained in data objects can be copied or moved between applications.
The size of the data is subject to a theoretical limit of about ExaBytes (in practice, the limit should not be a factor).
NSData is “toll-free bridged” with its Core Foundation counterpart, CFDataRef. See Toll-Free Bridging for more information on toll-free bridging. herf1 herf2

5.NSMutableData(2015-12-09)

NSMutableData (and its superclass NSData) provide data objects, object-oriented wrappers for byte buffers. Data objects let simple allocated buffers (that is, data with no embedded pointers) take on the behavior of Foundation objects. They are typically used for data storage and are also useful in Distributed Objects applications, where data contained in data objects can be copied or moved between applications. NSData creates static data objects, and NSMutableData creates dynamic data objects. You can easily convert one type of data object to the other with the initializer that takes an NSData object or an NSMutableData object as an argument.

6.NSPurgeableData(2015-12-10)

You should use the NSPurgeableData class when you have objects with bytes that can be discarded when no longer needed. Purging these bytes may be advantageous for your system, because doing so frees up memory needed by other applications. The NSPurgeableData class provides a default implementation of the NSDiscardableContent protocol, from which it inherits its interface.

7.NSDate(2015-12-10)

NSDate objects encapsulate a single point in time, independent of any particular calendrical system or time zone. Date objects are immutable, representing an invariant time interval relative to an absolute reference date (:: UTC on  January ).

[Objective-C] - NSObject的更多相关文章

  1. Automake

    Automake是用来根据Makefile.am生成Makefile.in的工具 标准Makefile目标 'make all' Build programs, libraries, document ...

  2. Objective C中的ARC的修饰符的使用---- 学习笔记九

    #import <Foundation/Foundation.h> @interface Test : NSObject /** * 默认的就是__strong,这里只是做示范,实际使用时 ...

  3. [转] 从 C 到 Objective C 入门1

    转自: http://blog.liuhongwei.cn/iphone/objective-c/ 进军iPhone开发,最大的难点之一就是怪异的Objective C语法了.不过,了解之后才发现,原 ...

  4. Objective C运行时(runtime)

    #import <objc/runtime.h> void setBeingRemoved(id __self, SEL _cmd) { NSLog(@"------------ ...

  5. Objective C ARC 使用及原理

    手把手教你ARC ,里面介绍了ARC的一些特性, 还有将非ARC工程转换成ARC工程的方法 ARC 苹果官方文档 下面用我自己的话介绍一下ARC,并将看文档过程中的疑问和答案写下来.下面有些是翻译,但 ...

  6. 刨根问底Objective-C Runtime

    http://chun.tips/blog/2014/11/05/bao-gen-wen-di-objective%5Bnil%5Dc-runtime-(2)%5Bnil%5D-object-and- ...

  7. Objective C类方法load和initialize的区别

    Objective C类方法load和initialize的区别   过去两个星期里,为了完成一个工作,接触到了NSObject中非常特别的两个类方法(Class Method).它们的特别之处,在于 ...

  8. Objective C运行时(runtime)技术的几个要点总结

    前言:          Objective C的runtime技术功能非常强大,能够在运行时获取并修改类的各种信息,包括获取方法列表.属性列表.变量列表,修改方法.属性,增加方法,属性等等,本文对相 ...

  9. Objective C笔记(第一天)

    • OC语言概述 1.早在20世纪80年代早期,Bard Cox发明了Objective C, 是扩充的C,面向对象的编程语言. 2.NEXTSTEP简称NS a.1985年,Steve Jobs成⽴ ...

  10. iOS开发——项目实战总结&带你看看Objective-C的精髓

    带你看看Objective-C的精髓 1:接口与实现 @interface...@end @implementation...@end @class 接口(头文件) 实现文件 向前引用 注:类别通过增 ...

随机推荐

  1. HashMap的实现原理 HashMap底层实现,hashCode如何对应bucket?

    韩梦飞沙  韩亚飞  313134555@qq.com  yue31313  han_meng_fei_sha 数组和链表组合成的链表散列结构,通过hash算法,尽量将数组中的数据分布均匀,如果has ...

  2. spring面试题 对DI , AOP概念的理解

    1.降低了组件之间的耦合性 ,实现了软件各层之间的解耦 2.可以使用容易提供的众多服务,如事务管理,消息服务等 3.容器提供单例模式支持 4.容器提供了AOP技术,利用它很容易实现如权限拦截,运行期监 ...

  3. [P1640][SCOI2010]连续攻击游戏

    Link: P1640 传送门 Solution: 可以发现这道题其实是属性值集合和装备集合的对应,且每个点只能用一次 那么就能想到二分图最大匹配,一旦不可行直接退出就行了 Tip: 1.$Hungr ...

  4. 【数论】【快速幂】【扩展欧几里得】【BSGS算法】bzoj2242 [SDOI2011]计算器

    说是BSGS……但是跟前面那题的扩展BSGS其实是一样的……因为模数虽然是质数,但是其可能可以整除a!!所以这两者其实是一样的…… 第一二种操作不赘述. #include<cstdio> ...

  5. GCC 内联汇编(GCC内嵌ARM汇编规则)

    转:http://smileleeboo.howbbs.com/posts/list/3127/81062.html 更多文档参见:http://pan.baidu.com/s/1eQ7nd8Q 有时 ...

  6. SQL Server 2008数据库备份和还原(还原是必须有完整备份)

    转自lwccc, SQLserver2008数据库备份和还原问题(还原是必须有完整备份) 首先,我要说明的是你必须拥有完整的数据库备份,下面的还原教程,才算有用. 这个连接是某高手的异常恢复方法, 实 ...

  7. 修改activeMQ端口号

    原文:http://jingyan.baidu.com/article/3ea51489fba6a152e61bbacc.html 修改TCP 61616端口 打开您的mq安装目录 请看下图 如下图所 ...

  8. Eclipse使用maven创建struct2项目及遇到的各种坑

    参考创建教程:http://www.jb51.net/article/45138.htm   坑一: Eclipse创建maven项目报错:Could not resolve archetype or ...

  9. OpenShift应用镜像构建(2) - 链式构建

    Openshift对于应用构建提供了三种模式 从应用的源代码构建并部署,Openshift通过一个S2I的构建过程编译打包并实现发布,具体可以参考 https://www.cnblogs.com/er ...

  10. [Java]在窗口界面上画出硬盘中图片文件

    利用类javax.swing.JPanel来在窗口界面上画图.图片文件通过javax.imageio.ImageIO类来获取. import java.awt.Graphics; import jav ...