In C ++, class methods include overload, override, and hide (of course, functions can also be overloaded .).
The coverage and hiding of C ++ is a very confusing concept, especially hidden. Learn objective-C, because it is similar to C ++, so pay
Objective-C uses nsstring to operate strings. nsstring is called a non-modifiable string because the content and length of a string cannot be modified when you create a string using nsstring.
1. Create a string
Nsstring * STR = @ "I Am a
For arrays, dictionaries, and collections, objective-C provides an enumeration method to access each element. There are two methods:
Method 1:
Nsarray * array = ...; member * member; int COUNT = [array count]; for (INT I = 0; I
Method 2:
In objective-C, the cocatouch framework further encapsulates the native socket, that is, stream.
Add cfnetwork framework
Initialize socket
Cfreadstreamref readstream; cfwritestreamref writestream; cfstreamcreatepairwithsockettohost (null,
The difference between the two is:
1. import will contain all information about this class, including entity variables and methods, while @ class only tells the compiler that the name declared after it is the name of the class. As for how these
The following are the notes for learning objective-C 2.0. The original book I purchased is the original English version. Due to my limited level of English, there may be omissions in understanding.
Original book purchase address: Amazon
2. Objects,
The following are the notes for learning objective-C 2.0. The original book I purchased is the original English version. Due to my limited level of English, there may be omissions in understanding.
Original book purchase address: Amazon
3.
The following are the notes for learning objective-C 2.0. The original book I purchased is the original English version. Due to my limited level of English, there may be omissions in understanding.
Original book purchase address: Amazon
7. The
Based on the experience of many netizens and the experience of iOS development, the author summarizes the iOS development technology for later users to learn, I also hope that I can gain a deep understanding of iOS development.
1. Sources of
The following notes reference site: http://blog.csdn.net/huanglx1984/archive/2009/07/06/4325377.aspx
Currently, apple only uses objective-C as the supported language.
The differences with C ++ are:
All classes in the O-C must inherit from
Objective-C syntax
Translate: sprouting stone
2010-03-10
Post please indicate to transfer Apple development Chinese Network (http://www.CocoaDev.cn)
The preceding description is an integral part of this document.
Objective-C is the most
Http://www.davidhamrick.com/2012/02/12/Adding-Properties-to-an-Objective-C-Category.html
Let's say you have a category that needs to store some information. Unfortunately you can't add an instance variable, but you can add something called an
Example ~ To implement
Interaction between JavaScript and objc
How does one implement JavaScript to call an interface inside objc?
I implemented it in this way.
For example, an entry
JS
Function testclick (CMD, parameter1, parameter2)
{
Alert (1
In: argument is an input argument only and won't be referenced later
Out: argument is an output argument only, used to return a value by reference
Inout: argument is both an input and output argument
Const: The (pointer) argument is constant
The role of the Protocol is similar to the multi-inheritance of abstract base classes in C ++. Similar to the interface concept in Java.The Protocol is a list of multiple class sharing methods,Methods listed in the Protocol are not implemented in
KVC
[Object setvalue: avalue forkey: akey]; // assign a value to the akey variable of the object
Avalue = [object valueforkey: akey]; // obtain the value of the akey variable of the object
[Object setvalue: avalue forkeypath: akeypath]; // set
Reprinted please indicate the source: blog.csdn.net/zhangxingpingAbout attributes
In C ++, you usually need to write the getter and setter methods to obtain or set the value of the instance variable. The two methods need to be displayed in the
Address: http://howtomakeiphoneapps.com/2009/05/for-and-foreach-loops-in-objective-c/
Loops are the gears of programming: they make your code take action.
The two loops I use most often is the For Loop (to do a predefined number of steps) and
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