------- android train iOS train 、 Looking forward to communicating with you ! ----------

I learned yesterday Foundation Structures commonly used in frames , Let me just briefly summarize , If wrong, please leave a message , thank you !

Foundation It's the basic framework . The framework contains many data types commonly used in development , Like a structure , enumeration , character string 、 Class etc. , It's something else ios Foundation of framework .

In the use of Foundation Data types in the framework , We just need to include its main header file .#import<foundation/foundation.h>. What needs to be added is that there is a Core Foundation frame , This framework is relatively low-level , Almost all the code in it is c Linguistic , and Foundation Medium is OC Of .

Now let's introduce some common structures :

Common structures are :

1.NSRange(location,lenght);// Scope of representation

It is defined as follows :

 typedef struct _NSRange {
NSUInteger location;
NSUInteger length;
} NSRange;

among location It's an example. 0 For the beginning index,length Is the length of the object . They are all NSUInteger type .

and NSUInteger The types of are defined as follows :

#if __LP64__ || (TARGET_OS_EMBEDDED && !TARGET_OS_IPHONE) || TARGET_OS_WIN32 || NS_BUILD_32_LIKE_64
typedef long NSInteger;
typedef unsigned long NSUInteger;
#else
typedef int NSInteger;
typedef unsigned int NSUInteger;
#endif

Here's an example

13.Object-C-- Talking about Foundation More related articles about the commonly used structure of framework

  1. 15.Object-C-- Talking about Foundation frame OC Array NSArray And NSMutableArray

    I summed it up yesterday NSString And NSMutableString, Today I want to summarize NSArray And NSMutableArray. NSArray An array is : Immutable arrays . nil It's a marker for the end of an array element .O ...

  2. 14.Object-C-- Talking about Foundation Frame string NSString And NSMutableString

    OC It is often used when using the string of , Today I'm interested in OC String to make a simple summary , If there are mistakes , Please leave a message . thank ! NSString Is an immutable string object . After it is initialized , You cannot change... In the memory allocated by this variable ...

  3. Hand rolling ORM Talking about ORM The foundation of the framework

    Curiosity Kills cats Always thought ORM The frame works well . It's powerful and has many advantages in one , Of course ORM It's not perfect , There are advantages and disadvantages in everything ! I used to think that I used ORM The framework doesn't need attention at all Sql How statements are executed , Not to mention optimization !!! ...

  4. Hand rolling ORM Talking about ORM Framework Add piece

    Fast transmission Hand rolling ORM Talking about ORM The foundation of the framework Hand rolling ORM Talking about ORM Framework Add piece Hand rolling ORM Talking about ORM Framework Update piece Hand rolling ORM Talking about ORM Framework Delete piece Hand rolling ORM Talking about ORM Framework Query ...

  5. Hand rolling ORM Talking about ORM Framework Update piece

    Fast transmission Hand rolling ORM Talking about ORM The foundation of the framework Hand rolling ORM Talking about ORM Framework Add piece Hand rolling ORM Talking about ORM Framework Update piece Hand rolling ORM Talking about ORM Framework Delete piece Hand rolling ORM Talking about ORM Framework Query ...

  6. Hand rolling ORM Talking about ORM Framework Delete piece

    Fast transmission Hand rolling ORM Talking about ORM The foundation of the framework Hand rolling ORM Talking about ORM Framework Add piece Hand rolling ORM Talking about ORM Framework Update piece Hand rolling ORM Talking about ORM Framework Delete piece Hand rolling ORM Talking about ORM Framework Query ...

  7. Hand rolling ORM Talking about ORM Framework Query piece

    Fast transmission Hand rolling ORM Talking about ORM The foundation of the framework Hand rolling ORM Talking about ORM Framework Add piece Hand rolling ORM Talking about ORM Framework Update piece Hand rolling ORM Talking about ORM Framework Delete piece Hand rolling ORM Talking about ORM Framework Query ...

  8. Start from scratch -07.Foundation Frames are often used as structures

    One .Foundation Frames are often used as structures NSRange\CGRange.NSPoint\CGPoint.NSSize\CGSize. NSRect\CGRect Use 1.   Basic use : //NSRa ...

  9. Objective-C:Foundation frame - Common classes -NSString Full solution

    Foundation The commonly used classes in frameworks are strings . aggregate . Dictionary, etc , Here's the string NSString. This paper respectively introduces NSString The creation of . Read from a file NSString character string . Change the external... By function NSString change ...

Random recommendation

  1. mysql Ban autocommit, And the problems

    Original address :http://blog.51yip.com/mysql/1230.html http://blog.csdn.net/ying_593254979/article/details/12095 ...

  2. JavaWeb Learning notes ——XML analysis

    DOM Parsing operation Just following nodes <addresslist> Next, create a child node <name> <?xml version="1.0" encoding=&quo ...

  3. Super maze nabc

    One of the characteristics : Puzzle mode N  Our game needs a little puzzle to make it wonderful A In the course of the maze , There will be a point , There's a little puzzle , If you answer right, you can pass B Make the game more interesting , Attract users C There are a lot of answer games , Not long ago, Tencent's hand ...

  4. libevent ( 3、 ... and ) Event registration and loop monitoring

    Event registration and loop monitoring stay libevent In order to monitor the occurrence of certain events , Set the callback function after the event is triggered , That is to say, register the event to the current IO In the model . Event registration Event initialization Use `event_new` Function to initialize the event ...

  5. python Learning notes --for loop

    Recommend a language learning website :http://www.codecademy.com Have a tutorial , You can write as you learn , Pretty good . for loop : 1.for loops allow us to iterate throug ...

  6. trend DBA[MSSQL piece ] Walk thousands of miles

    original text : trend DBA[MSSQL piece ] Walk thousands of miles I don't know. You're right SQL Are you interested in the series Find a way here first The readers of this paper are SQL rookie Welcome Daniel to refute or add Since it's about exploring the way Let's talk about partial gate matching in data filtering I hope I can ...

  7. APP Production process picture explanation

    Try my best to summarize the next app The production process of , Not necessarily complete , It may not be all app A process of production , Different companies can be very different , I just want to summarize the general public's , Make a reference . Demand planning : Design : Development : test : There's nothing to draw ...

  8. VM Virtual machine connected to Linux Black screen problem

    After trying to close VM The acceleration of 3D After figure , If the screen is still black ( But when it's suspended, it shows ), You can try in as an administrator cmd Input in netsh winsock reset, It will return to normal after restart . The problem seems to have something to do with a port on the network , Last time I played ...

  9. youtube link for review STAT(1)

    Confidence Interval: https://www.youtube.com/watch?v=bekNKJoxYbQ Introduction to confidence interval ...

  10. 【react】 When react Frame meets Baidu map

      Baidu map official document use guidance is like this : Introduce... Into the page <script type="text/javascript" src="http://api.map.baid ...