1: retain returns a value of the ID type. In this way, you can execute a reservation call with parameters of other messages in nesting mode, increase the reserved counter value of the object, and require the object to perform some operation, for
1. If you want to create an instance using "-", use "+" as the class method ". 2. Select a return type and enclose it in parentheses. (Void) indicates that no return value is returned. (bool) indicates that a Boolean value is returned. (Nsobject *)
Category)['K processing Ti processing equipment Ri]N. Category, category; CategoryDefinition: Add a new method to an existing class I. Declaration category
The Declaration format of a category is similar to that of a category, as follows:
@
to be transferred from an Sina Blog, You can watch the qianfeng video to learn about" dog walking principles "first ". This article is well written. It turns around ......
When self .. is used is actually related to the access method of obj-
Cocoa memory management method:Retain, releaseAndAutorelease
Summary:
Each object maintains a reserved counter. when an object is created, its reserved counter value is 1. When the object is retained, the counter is + 1. When the object is
In short, you can understand @Selector() Is to take the class method number, his behavior can basically be equivalent to the function pointer in C language, but in C language, the function name can be directly assigned to a function pointer,
From http://www.cnblogs.com/biosli/archive/2011/04/30/Mixing_ObjectiveC_and_Cplusplus_in_iPhone_Development.html
Let's talk about the problem first,ArticleThe title is actually not good. In iOS development, the libraries created by Apple are
Summary: In objective-C, the method used to call a function is message transmission. The difference between this method and a common function call is that you can transmit any message to an object at any time, instead of declaring these methods
ArticleDirectory
Install
Development
Run
Make
Reference
I am also a black apple family. The reasons for not buying Mac are different. Even if it is installed with a black apple, you need to work on windows for a long time
Example of method definition:
-(Void) insertobject :( ID) anobject atindex :( nsinteger) Index
Explanations:
1. Method Modifier
-This method is an entity method. It must be a class instance and can be called only through an instance.
+
In objective-C interaction between iOS development and JavaScript, we can useStringbyevaluatingjavascriptfromstring to obtain relevant node attributes in obj-C and add JavascriptCode. But how can we monitorWhat about JavaScript response events.
Similar to C #, OC also has a root type, that is, nsobject, which contains an alloc method and an init method. As the name implies, alloc is used to apply for memory, create an internal structure of an object, and assign the instance variable to 0.
1. In fact, the inheritance in OC is basically the same as that in C #. They all add the: and parent class name when defining the class, that is, myclass: parentclass.
2. Only single inheritance is allowed.
3. It is a bit strange to use attributes.
Objective-C method call Process
Objective-C is a dynamic language. The dynamic words are mainly reflected in the dynamic search method when we call the method, and then the corresponding function address is called. The runtime is the entire
1. Learn the C language basics first;
2. Read programming in objective-C 2.0. Do not read objective-C 2.0.
Program Design;
3. Read "cocoa Design Patterns" and "cocoa programming developer's handbook". Do not read them because they are difficult and
(For passing values between viewcontrollers) the simplest and most professional method is the so-called shared instance ). The basic practice is to create a singleton class method that can instantiate this class at the first call, and then return
Numeric value to boolean type,1. nsstring contains many features. For example, it can be directly converted to the numeric type (integer or floating point type)
1Nsstring * test =@"This is my name";
2
If (Nsorderedascending = [test compare:
From: http://www.yifeiyang.net/iphone-development-techniques-of-the-tools-for-chapter-1-the-xib-file-is-converted-to-objective-c-source-code/
Nib2objc is a small conversion tool that can automatically convert XIB files to objective-CSource
From: http://blog.prosight.me/index.php/2010/11/670
UUID is a 128-bit value, which guarantees uniqueness. Generally, it is generated by the MAC address of the machine's Nic and the current system time.
UUID is a string connected by a hyphen.
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.