A framework is a collection of classes, methods, functions, and documents organized in accordance with certain rules, so that programmers can develop programs more easily and quickly. The cocoa program is written mainly in two frames Foundation and
Continue learning Pointers:Here's a pointer to the pointerAs the name implies pointers to the pointer is a pointer to the address of a needle is also called a two-level pointer, nonsense say we see the code definition and effect#include intMain ()
02. First OC Language classIn the Java language, creating a class requires only one file, whereas in the OC language, creating a class requires two files. m files and. h files.The. h file is a declaration class used to declare member variables and
Transfer from http://blog.csdn.net/haishu_zheng/article/details/12873151The @dynamic in Objective-cThe difference between @dynamic and @synthesize@property have two corresponding words, one is @synthesize and the other is @dynamic. If @synthesize
This time the main content is block, for beginners, the code involved in the content of the block is really easy to confuse. First of all, the concept of block, block is an apple for C, C + + and OC add a feature, it contains a part of the code, can
The main content of this section is OC Language Foundation, the OC is more familiar with the content of this article can not be read, basically is to translate the official documents.The main content of this article is about the language basis of OC,
We discussed the processing of classes and objects in runtime, and the handling of member variables and attributes. In this chapter, we're going to start talking about the most interesting part of runtime: the message handling mechanism. We will
NSNumber: is a class that handles numbers in OCNsvalue is a subclass of NSNumberHow to handle:Wrap the int,float,double into an objectBenefits of using NSNumber:You can save data of a basic data type to an array or dictionary//defining basic data
In the program design, the use of functions undoubtedly greatly simplifies the writing of code, improve the efficiency of code operation, reduce duplication of code. So let's take a look at the method in detail. This example also takes the people
First knowledge of Objective-cWhen Objective-c was first born, the extension. m stands for message, which refers to a major feature of Objective-c.@“%d12 ); // 可以输出 12%d23 // 可以输出23@“%s “ , // 可以输出 字符串 abcprintf ( “%s” , “abc” ) ; // 可以输出
ConceptNSLog () can use the%@ format specifier to output an object. When NSLog () processes the%@ specifier, it asks the corresponding object in the argument list to get a description of the object. Technically, NSLog () sends a description message
Summary of practical methods of objective-c time operationget the end date according to the month/** * getmonthenddate * get the end date according to the month * * @param monthbegin month (yyyy-mm-dd HH:mm:ss) * * @return Nsdate/nil */+ (NSDate
In a nutshell, a constructor is a function of initializing an object when it is created, initializing some of the member variables in the object, and the destructor is doing some cleanup work on the object being deleted, that is, the specialized
Objective-C supports global variables. There are two main implementation methods: the first one is the same as that in C/C ++, and the "extern" keyword is used; the other is the singleton implementation. (For example, we often put a variable in
Objective-the C language is designed as an exquisite, object-oriented, and easy-to-use computer language. It is fully based on the Standard C language and has made the smallest but powerful extension language. This extended language draws on the
In fact, I don't know how to write these concepts. I can't copy them directly from a book. It's better to buy books.
Abstract concepts are generally written by masters. For example, this can be the Java programming idea of a pillow. That's really an
Objective-C reflectionThis is what I will introduce in this article. When I first came into contact with Java, I thought the wholeReflectionThe packages are very novel, which makes Java and interpreted scripting languages closer, while also opening
We know that the message sending program to nil in Objective-C will not crash,
Objective-C is based on the C language,
On PC, null pointer operations are performed in C language,
The program crashes due to a protection error due to out-of-bounds
Introduction:
In the previous article, we talked about KVC. In this article, we learned KVO. The full name is: Key Value Observing. the literal translation is: Key Value-based observer.
So what is its use? KVO is mainly used for view interaction.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service