First, the class1. Class nameclass names should be prefixed with three uppercase letters (two-letter prefix for Apple's class reservation)
Not only the class, the public constants, protocol, etc. are prefixed by the same three uppercase letters.
#import int main (int argc, const char * argv[]) {@autoreleasepool {//Dictionary /* Dictionary Nsdictionnary//nsmutabledictionary 1. Concept: A dictionary is a set of keywords: ' key ' and its defined values ' value ', and it is a collection of key-
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
Objective-c language is a dynamic language that puts a lot of static language in the process of compiling and linking things to the runtime. At the same time OC is also a simple language, a large part of the content of C, just add the language level
The main content of this chapter will be gathered at runtime to handle member variables and attributes. Before discussing this, let's start with an important concept: type coding.Type encoding (Type Encoding)As a complement to runtime, the compiler
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
Uitoolbar control: is a frequently used toolbar control, in which you can add many other controls, UILabel, UIButton, UIImage, Uibarbuttonitem, Uitextfield, and so on 、、。 A layout that can be used to customize the controls in view views. After the
NSDate: Acquisition and manipulation of time1. Get the current time1 // Get Current date 2 NSDate *date = sender.date; 3 NSLog (@ "%@", date);2. Convert date to string and format1 // " Span style= "color: #008000;" >date to string 2
We know that in C, using sizeof () to calculate the number of bytes occupied in the memory, after referencing string.h, use strlen () to calculate the length of the string (not including).In Object-c, the "Length" method can return the length of a
In object-oriented languages, OBJECTIVE-C's handy initialization function can be understood as a constructor with parameters, such as java,c++, but somewhat different ...For example, use the student class as an example First is the Student.h
Reprint Address: http://www.cnblogs.com/mjios/archive/2013/03/28/2983753.htmlDirectory of this document
Objective
First, Introduction
Second, Syntax preview
Description: This objective-c topic is a prelude to learning iOS
I. Concepts of classes and objectsTwo of the key concepts in OC are classes and objects, and the relationship between classes and objects is like the relationship between a mold and an item made with this mold. A class gives a uniform definition of
Objective-c language uses "message structure" rather than "function call"The message structure is represented as follows:// messageing (objective-c) New ]; [obj Performwith:parameter and:parameter2];The function call is represented as follows://
Artifice refers to a skill and a product that is too kit and useless.Reprint please specify the source http://blog.csdn.net/uxyheaven/article/details/46391771We can define basic operators and types with macros.#define 加 +#define 减 -#define 乘
Inheritance, initialization method, convenience builderToday we are going to learn to inherit the initialization method and Traverse The constructor first we have to understand some conceptual things . Inheritance : In oc , inheritance is a single
Nonatomic: Non-atomic access, non-synchronous, multi-threaded concurrent access improves performance. If this attribute is not added, the default is two access methods are atomic transaction access.(Atomic is a thread-protection technique used by
The syntax for declaring property is:@ Property (attribute [, attribute 2,...])Type name;
There are three types of attributes:
1. read/write attributes (writability) include: readwrite/readonly
2. setter semantics (setter semantics) includes:
Original post address: http://blog.prosight.me/index.php/2009/09/347
In objective-C, when a class needs to reference another class, that is, to establish a composite relationship, you need to create a pointer to the referenced class in the Class
In objective-C 2.0, class extensions is added to solve two problems:
An object can have a private interface and can be verified by the compiler.
Supports a public read-only, private writable attribute.
Private Interface)
Before objective-C 2.0,
Understanding the meaning of @ class in objective-C
In objective-C, when a class is used to another class and the referenced pointer needs to be created in the Class header file,
The following code is used:
A. H file
C code
# Import "B. H"
@
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