Objective-c is the base language for iOS development, hereafter referred to as OC1, OC and C language header file differences:#import: #include一样都是编译预处理指令#import function is the same as # include to copy the contents of the file to the location of
First, description methodThe description method includes class methods and object methods. (Included in the NSObject Class)(i) Basic knowledge-description (Object method)When you use NSLog and @% to output an object, the object's description method
Apple Official document: Unstable portalThere are several reading notes, other knowledge points are not important or are already familiar with no need to record."Programming with Objective-c" chapter III Working with Objects"Programming with
First, what is the proxy mode?Proxy mode is a kind of design pattern that is often encountered in OC, what is called proxy mode?As an example:There is a baby, he himself will not eat and bathe and so on some things, baby mother to work and very busy,
Delegate modeTipThe delegate object should not be retainThe class that implements the delegate pattern should:
Has an instance variable named Delegate_ to refer to the delegate.
Therefore, accessor methods should be named Delegate and
Important knowledge point personal understanding recordThe first article: OC is the message structure language, runtime parsing, compile-time not careArticle Two: Introduction of the head file try not to. h file (compilation trouble), where to
Benefits of Encapsulation:
Filter for unreasonable values
The assignment process inside the Shield
Let the outside world not pay attention to the internal details
Benefits of Inheritance:
Do not change the original
First, what is a null pointer and a wild pointer1. Null pointer1> A pointer that does not store any memory address is called a null pointer (null pointer)The 2> null pointer is a pointer that is assigned a value of 0, and its value is 0 before it is
@ stands for "Objective-c" logo that proves you are using objective-c languageObjective-c language keywords, @property paired with @synthesize.function: Let the compiler automatically write a method declaration with the same name as the data member,
Objective-C has a type called ID, which sometimes operates like void *, but it strictly specifies that it can only be used on objects. Objective-C is different from Java and C ++. You do not need to know the type of an object when calling the method
note that the following syntax requires downloading xcode 4.4. 1. Enumeration type change old Syntax: [CPP] view plaincopy typedef Enum week { moday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday } week; the problem with the old
Xcode: You can regard it as a development environment, just like Visual Studio, netbeans, or sharpdevelop.
Meaning. You can separate the functions that interface builder considers to be used to draw interfaces in Visual Studio.Program.Objective-C:
The last time I read this book, I hurried through it. Recently I was not very busy. I revisited it and wrote my notes ~..
If you are interested, you can buy one. I think this book is quite good.
Because most of them are written on mobile phones when
I. Main Functions of retain attributes
1. O-C memory management and point syntax
1> OC Memory Management normally requires a large number of retain and relrese operations
2> point syntax can reduce the use of retain and release operations
Ii. @
1): block learning Summary
Block: used to save a piece of code.
1. Block features:1> block encapsulates a piece of code that can be executed at any time2> A block can be used as the return value of a function or function, and it can contain input
Copying an object is to copy an object as a copy. It will open up a new memory (heap memory) to store the copy object, just like copying a file, that is, the source object and the copy object are two different memory regions. The protocol or
1. General setter and getter statements
Setter and getter are the most basic things of a class. Any object-oriented language involves the concept of C ++ and Java. Because setter and getter are the most basic support for object-oriented language
Many programmers who want to develop IOS, or who are developing IOS, have done Java or C ++ before. The first time they see Objective-C code, they will have a headache, the syntax of Objective-C code is very different from that of Java and C ++.
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.