Nsoperation
First, Nsoperation1. IntroductionThe Nsoperation instance encapsulates the required operations and the data needed to perform the operation, and can perform this operation concurrently or in a non concurrency manner.The nsoperation
1. Create a string
(1) Constant string
Copy Code code as follows:
NSString *string = @ "I am an iosdevtip!";
(2) Common methods of Creation
Copy Code code as follows:
NSString *string = [[NSString alloc] init];
Dynamic type and dynamic binding, ID can represent any pointer type, definition ID variable not added *Polymorphism means that member variables and methods defined in the parent class inherit from the quilt class, and can have different data types
In OC (OBJECTIVE-C) There are dynamic types that fall into the following categories:-(BOOL) whether the iskindofclass:classobj is a classobj class or its subclasses -(bool) ismemberofclass:classobj-( BOOL) Whether there is this method
1, the class name of each class must be unique in the software (including in the framework, bounds), the class name has more than one word is the Hump method.
Prefix
Framework
NS
Foundation (OS X and IOS) and
Nscoder Class 1, overviewThe object's instance variables and other data are encoded as blocks of data, then they are present to disk, later read back into memory, and new objects are created based on the saved data, also known as serialization or
Inheritance relationships for classes
Compound relationship: Has aInheritance relationship: is aConsider this question:When you write cat and dog classes, you'll find that there are a lot of the same or similar properties and methods in these
OBJECTIVE-C Memory Management
Management Category: OC objectsThe memory resources that each computer system can use for the program are limited. There are two things we should care about:Allocate when needed, release after useDo not use any
Auto Free Pool
is a semi-automatic memory management methodAutorealease Method:-(Instancetype) autoreleaseThis method places the object in the auto-free pool, and all objects in the pool are destroyed when the pool is automatically freed.Common
nullability
The nullability attribute is used to indicate whether the pointer can be nil, and the intent of the API can be expressed more clearly by this feature.At the same time, the compiler nullability the code at compile time, prompting the
Today, the content of the study is relatively small, mainly the teacher informed to determine the subject, found some information, and ultimately decided to make a route record of the app.Some quick actions:Disable all breakpoints, command + Y. h
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
Today, I saw an article titled "objective-c" in the garden.
2.0 with cocoa Foundation --- 5, class type, selector and function pointer ", I have made a wonderful speech and can't help but put it
Code Add notes here for future viewing. My personal
1. It is used to notify an object of what to do, that is, the notification object executes an action.
1.1. in objective-C, square brackets also have other meanings: they are used to notify an object of what to do.
For example:
[Shape draw];// This
In fact, I don't know how to write these concepts. I can't copy them directly from a book. It's better to buy books.
Abstract concepts are generally written by masters. For example, this can be the Java programming idea of a pillow. That's really an
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"
@
Introduction to the objective-C Programming Language
Introduction to object-oriented C language programming:
Object-oriented C language is a simple computer language designed for advanced object-oriented programming. The object-oriented C language
From: http://iosdevelopersnote.blogspot.com/2010/11/block.html
Blockapple adds Block Extension usage in C, objective-C, C ++. Currently, only Mac 10.6 and iOS 4 are supported. A block is composed of a bunch of executable programs. You can also
Automatic type conversion or forced type conversion can be performed based on the storage space occupied by data types. The general principle is that the data type of small storage capacity can be automatically converted to the Data Type of large
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.