Foundation Framework - Objective C
If you refer Apple documentation , you can see the details of Foundation framework as given below.
The Foundation framework defines a base layer of Objective C classes. In addition to providing a set of useful primitive object classes, it introduces several paradigm that define functionality not covered by the Objective C language. The Foundation framework is designed with these goals in mind:
The framework was developed by NeXTStep, which was acquired by Apple and these foundation classes became part of Mac OS X and ios.
Since it was developed by NeXTStep, it has class prefix of 'NS'.
Generally we use something like,
to import a Objective C class , but in order avoid importing too many classes , it's all imported in
NSObject is the base class of all objects including the foundation kit classes. It provides the methods for memory management. It also provides basic interface to the runtime system and ability to behave as Objective C objects, it does not have any base class and is the root for all classes.
Foundation Classes Based On Functionality
The Foundation framework defines a base layer of Objective C classes. In addition to providing a set of useful primitive object classes, it introduces several paradigm that define functionality not covered by the Objective C language. The Foundation framework is designed with these goals in mind:
- Provide a small set of basic utility classes.
- Make software development easier by introducing consistent conventions for things such as deallocation.
- Support Unicode string, object persistence and object distribution.
- Provides a level of OS independence to enhance portability.
The framework was developed by NeXTStep, which was acquired by Apple and these foundation classes became part of Mac OS X and ios.
Since it was developed by NeXTStep, it has class prefix of 'NS'.
Generally we use something like,
#import <Foundation/Foundation.h>
to import a Objective C class , but in order avoid importing too many classes , it's all imported in
#import <Foundation/Foundation.h>
NSObject is the base class of all objects including the foundation kit classes. It provides the methods for memory management. It also provides basic interface to the runtime system and ability to behave as Objective C objects, it does not have any base class and is the root for all classes.
Foundation Classes Based On Functionality
Functionality | Description |
---|---|
Data Storage | NSArray , NSDictionary and NSSet provide storage for Objective C objects of any class. |
Text and String | NSCharacterSet represents various of characters that are used by the NSString and NSScanner classes.The NSString classes represent text string and provide methods for searching,combining, and comparing strings. An NSScanner object is used to scan mumbers and words from an NSString object. |
Dates and Times | The NSDate, NSTimeZone and NSCalendar classes store times and dates and represent calendrical information. They offer methods for calculating date adn time differences. Together with NSLocale, they provide methods for displaying date and time in many formates and for adjusting times and dates based on location in the world |
Exception Handling | Exception handling is used to handle unexpected situtaions and it's offered in objective C with NSException. |
File Handling | File handling is done with the help of class NSFileManager. |
URL loading system | A set of classes and protocols that provide access to common internet protocols. |
No comments: