Arrays are ordered, can only hold objects, arrays have the concept of subscript (index), index elements by index, subscript starting from 0, the array is divided into non-variable groups (Nsarray) and variable arrays (Nsmutablearray).Immutable
This article is from the long458 column, linked to http://blog.csdn.net/long458/article/details/41981273In general, there are several ways to sort the array commonly used in OC:
Developing iOS apps to invoke HTTP interfaces, get HTTP resources, have a fairly mature framework asihttprequest. I prefer to use the original API, which has many similarities with other object-oriented languages. This article describes the use of
NSString, immutable strings, that is, content and length cannot be modified after creation.Nsmutablestring, a mutable string that can be modified after it is created.Immutable string (NSString)Create a string1 //Create a string2NSString *STR1 =
Knowledge Review
One, custom construction method
Second, description method
Description: This objective-c topic is a prelude to learning iOS development, and to enable programmers with experience in object-oriented language development
———————————————————————————————————————————Class method① class Method:+ The beginning of the method (defined as the process form and the object method, just the + start, which is the only difference)The invocation of the class method:[Class name
Nsarray: Ordered collection, Nsset: Unordered collection, hash store. But Nsset guarantees the uniqueness of the data. When you insert the same data, there is no effect. From the internal implementation is a hash table. Nsmutableset is a subclass of
ARC is a reference counting mechanism that cocoa system helps you to complete object memory release. h file1 //Person.h2 //01-arc3 //4 //Created by Ma C on 15/8/13.5 //Copyright (c) 2015 BJSXT. All rights reserved.6 //7 8 #import9 Ten
Over the years, OBJECTIVE-C has been developing and evolving. Although the core concepts and practices have remained unchanged, it has undergone great changes in many areas and made great progress. These changes improve features such as type safety,
Application of runtime mechanism in OBJECTIVE-CFirst, the initial knowledge of the runtimeObjective-c is a dynamic language, the so-called dynamic language, is in the execution of the program dynamically determine the variable type, the
Reference CountEach object has a multiple integer associated with it, called its reference counter or retention calculator, and when a piece of code needs to access an object, the code adds 1 to the object's reserved counter value, indicating that I
GeneratorGenerator, also a builder pattern, is also the design pattern when creating objects. There is a director (the conductor) in this mode, and the client knows that the class reference is used to create the product. There is also a builder
Directly on the code:////MAIN.M////Created by on 15/4/2.//Copyright (c) 2015. All rights reserved.//#import #import "Tire.h" intMainintargcConst Char* argv[]) {//nsstring class /* * Learning system classes need to grasp a few points: * 1,
The classification in objective-c allows us to augment it by adding a method to a class (but we cannot add new instance variables through category), and we do not need to access the code in the class.The protocol in OBJECTIVE-C is a ubiquitous
Same point:Can be used as the return type of a methodDifferent points:Instancetype can return objects of the same type as the method's class, and the ID can only return objects of unknown typeInstancetype can only be used as a return value, not as a
@ stands for "Objective-c" logo that proves you are using objective-c languageObjective-c language keywords, @property paired with @synthesize.function: Let the compiler automatically write a method declaration with the same name as the data member,
We discussed the processing of classes and objects in runtime, and the handling of member variables and attributes. In this chapter, we're going to start talking about the most interesting part of runtime: the message handling mechanism. We will
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 classification in objective-c allows us to augment it by adding a method to a class (but we cannot add new instance variables through category), and we do not need to access the code in the class.The protocol in OBJECTIVE-C is a ubiquitous
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.