What is multithreading?First, what is a thread that you can understand as a thread is the process process.Process is God horse?A process is a small task in a computer.Let me tell you this.Our main program is a rib fool, only one thing in a time.
The principle of KVO and Nsnotificationcenter in Objective-c is a good implementation of the observation pattern, the following code illustrates the usageThe use of KVO1- (void) Viewdidload {2 [Super Viewdidload];3 //additional setup after
Original URL: http://blog.csdn.net/totogo2010/article/details/8198694Introduced:Third-party libraries are indispensable when developing applications and can improve the efficiency of development. Some frequently used libraries, in the new project
Two classes are provided in objective-c to implement dictionaries, namely nsdictionary and nsmutabledictionary. Among them, Nsmutabledictionary is a subclass of Nsdictionary, which inherits the parent class method while supporting the insertion and
Thread synchronization is implemented in 1,objective-c:Mutexlock (mutex), Nscondition Lock (conditional lock) Message delivery2,UDP and TCP:TCP: Transmission Control Protocol, which provides connection-oriented, reliable, point-to-point
Double, float types often have unpredictable problems when you need to calculate accurately in iOS:During debugging, you can see that the Doule type D3 the value is not expected to be 9999.99 during the calculation.If important data, such as amounts,
Classes are the core of objective-c, and objective-c programs are all around classes. The OBJECTIVE-C program consists of at least the following three parts:1. Class Interface: Defines the data and methods of the class, but does not include the
When you define a class in Objective-c, you can also use a public, private, similar to C + + to decorate member variables, as follows:[CPP]View Plaincopy
@intterface test:nsobject{
@public
int i;
INTJ;
Runtime: Run-time mechanismThe first thing to understand:1. What is1> runtime is a relatively low level of pure C language API, belongs to 1 C language Library, contains a lot of the underlying C language API2> usually write the OC code, in the
Objective-c Five main features:
Fully compatible with C
Object oriented
Single Inheritance (functions in OC are virtual functions, pseudo-Multiple inheritance through classes and protocols)
Dynamic binding (when dynamic_cast
The Objective-c class in the core processing string is NSString and nsmutablestring, the biggest difference between the two classes is that the content and length of the string cannot be changed dynamically after nsstring creation of the assignment,
Inherited
What is inheritance? What are the advantages and disadvantages of inheritance?Inheritance refers to the properties and methods of an object that directly use another object.Inheritance needs to conform to the relationship: is-a (e.g.
Dot syntaxThe essence of point syntax is method invocationScope of member variables@public : The member variables of an object can be accessed directly from anywhere@private : can only be accessed directly in the object method of the current class
SummaryAs long as we use objective-c, we deal with method calls every day. We all know that the method of OBJECTIVE-C resolution is dynamic, but in the bottom of a method is how to find, how the method cache and how the operation is little known.
Uinavigationcontroller (Navigation view Controller)The Navigation view Controller is also a view controller that manages multiple child view controllers, and when you use the Navigation view controller for layout, you need to specify the window's
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.OBJC does not provide a direct variable-length parameter method, which requires the use of the Av_list method in the C standard library, and
As I writeProgramThe experience is not quite rich, and the understanding of object-oriented is still stuck in the state of knowing the principle but not how to use it efficiently, so here is a brief introduction to my understanding. object-oriented
Difficult to express original meaning in Chinese
Method and class attributes
Objective-CNow supports some GCC attributes for objective-C methods.Syntactically, attributes for a method follow the method's declaration,And attributes for a method
This article has a delete section:
Integer Data (INT)
In objective-C, the int type can store positive or negative integers (I .e. no decimal places). The number of INTEGER (INT) digits depends on the target machine, which is determined during the
I. golden rules for memory management:
The basic rule to Apple is everything thatincreases the reference counter with alloc, [mutable] Copy [withzone:] Or retainis in charge of the corresponding [auto] Release.
If an object uses alloc, [mutable]
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