OverviewIn multithreaded programming, we often encounter multiple threads accessing shared resources at the same time, which we need to avoid by synchronizing threads. That is, to Cheng the line.Because Objective-C it is a C superset of language. ,
First, why use multithreading?1, cycle simulation time-consuming task1. Synchronous execution2. Asynchronous execution(Small Secretary for cigarette programming)3. ProcessAn application that is running in the systemEach process is independent and
① Reduction AbbreviationsNamed abbreviations are used only for generic professional terms, such as, URL non-self-creating named abbreviations, such as Ctr , Msg . The name is rather longer and not difficult to understand.② of ProcessUse before the
OBJECTIVE-C Memory Management
Management Category: OC objectsThe memory resources that each computer system can use for the program are limited. There are two things we should care about:Allocate when needed, release after useDo not use any
Auto Free Pool
is a semi-automatic memory management methodAutorealease Method:-(Instancetype) autoreleaseThis method places the object in the auto-free pool, and all objects in the pool are destroyed when the pool is automatically freed.Common
immutable string Manipulation :1.initWithFormat:. The initialization operation, where the effect of a direct assignment is the same as the method, for example:1 nsstring *string1 = [[NSString alloc] Initwithformat:@ "iOS"]; 2 @" IOS ";However, it is
The earth has only one, so declare a Earth object on it, you can not declare two AH! Similarly, sometimes a class can have only one object case, such as a server, just want to save to a in//face, this way, the next time you can take out the last
Take advantage of the recent relatively busy, you can again study the source code of OBJECTIVE-C, by the way to comb the idea, willing to have a greater harvest.Objective-c is an object-oriented programming language. Its object model was created
1. Agent First KnowledgeSuppose the boss needs to buy a computer for the worker to buyThe boss needs an agent to buy a computer for the worker.Boss creates a protocol protocol for the method of buying a computerBosses have a class of attribute
Three main object-oriented features: encapsulation, inheritance, and polymorphismThe purpose of encapsulation is to hide the data, the outside world only through the method (interface) to access or set the data inside, can not directly modify or
We have learned from childhood, the dictionary has always been a good helper of our study, in OC the dictionary still has its irreplaceable role, and now we will go through her mysterious veil ...Advantages of the Dictionary:1. A dictionary is a
1 Sending a messageThe real fun is accompanied by the "sending messages" began. Sending a message would be the basic building block of your objective-c apps because it's how do you tell an object to Perfor M some action or to give you some piece of
In object-oriented languages, many different implementations of interfaces are polymorphic. Polymorphism responds to different objects in response to the same method, polymorphism in code, that is, a variety of forms, must have inheritance, no
1. Classification (category)Using classification in OBJECT-C is a compile-time tool that allows us to augment it by adding a method to a class (but not adding new instance variables through category), and we do not need to access the code in the
Keyword keyword definition: words > Keywords that are given special meaning by C language: All lowercase > Keywords are displayed in the Developer tool Special colors * compiler is strictly case-sensitive *note: The keyword cannot be used as the
Polymorphism literally means "multiple states." In object-oriented languages, many different implementations of interfaces are polymorphic. Polymorphism is a technique that allows you to set a parent object to be equal to one or more of his child
Singleton mode iOS development may be used in one of the most commonly used patterns. But because OC language features itself, want to write a correct singleton mode is more cumbersome, iOS singleton mode design ideas.Please refer to this article
Objective-cObjective-c extends the C language and joins the object-oriented and Smalltalk messaging mechanisms. The core of this extension is a runtime library written in C and compiled languages. It is the cornerstone of Objective-c object-oriented
What is a timestamp?time Stamp ( timestamp ), which is typically a sequence of characters. Uniquely identifies a moment in time. Digital Timestamp technology is A variant application of digital signature technology. thinking: Simply speaking is
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.