Support Types
In addition to classes, the Foundation framework includes several functions and types based on C structures. The NSTimeInterval type has already been mentioned. NSTimeInterval is implemented using the C double type. Structures that store points, sizes, and rectangles are defined in the Foundation framework. Another type used extensively is NSRange.
NSRange
NSRange is a C structure used to identify a location and a length. For example, an NSRange can be used to specify a range of characters to delete from a mutable string using NSMutableString’s –deleteCharactersInRange: method. The location is the index of the first character to delete. The length is the number of characters to delete. The NSRange structure is used by many Cocoa ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access