Summary of categories (Extended categories) in ios
Category
Category is a way to add a new method to an existing class.
Using the dynamic runtime allocation mechanism of Objective-C, you can add new methods to existing classes. This method of
1. Many languages are learned from HelloWorld, and OC's HelloWorld are as follows:#import int main (intconstChar * Argv[]) { @autoreleasepool { // OC version of HelloWorld NSLog (@ "Hello, world! " ); } return 0 ;}2. Code
This section describes static attributes and static method access modifier Singleton mode magic method class automatic loading.
Content described in this section
Static attributes and static methods
Access modifier
Singleton mode
Magic
First day1. What is a class? What is an object?1) The real world is made up of a lot of objects.Object-based extraction of classes2) object: a single individual that really existsClass: Represents a class of individuals (types, categories)3) The
Original: Java, C #, Swift syntax vs. quick check table
Java 8
C # 6
Swift
Variable
Type variable name;
Type variable name;
var variable name: type;
Variable (type inference)
Differences between Objective-C methods and functionsThe difference between the Objective-C method and the function is that all functions of the object do not depend on the object.
Method
Function
-(Void) test;
Void test (
The view resolver is divided into:Default method Name ResolverProperty Method Name ResolverParameter Method name ResolverTest case: Creating a classPackage Cn.happy.day03multiaction;import Org.springframework.web.servlet.modelandview;import
The previous blog is mainly for small files directly into the WW display, however, when the file is particularly large, this approach is not feasible. So to slice large files and generate a local cache, WW can load the local cache file, guaranteeing
Method Reference: If the function in the LAMBDA body, there is already a method to provide the implementation, you can use the method reference (You can interpret a method reference as a different representation of a LAMBDA expression)1.
Thinkphp is a free open source, fast, simple object-oriented lightweight PHP development Framework, founded in early 2006, followed the release of Apache2 Open source protocol for Agile Web application development and simplified enterprise
What this section explains
Packaging
Inherited
Polymorphic
Overload
Rewrite
Objective
PHP's object-oriented and Java-oriented object, are divided into three characteristics, encapsulation, inheritance, polymorphism. These
This section describes how to encapsulate and inherit multi-state rewriting.
Content described in this section
Encapsulation
Inheritance
Polymorphism
Heavy load
Rewrite
Preface
Like JAVA object-oriented, PHP has three main features:
Personal Understanding:What spring Aop is: aspect-oriented programming, similar to a custom interception operation, supports intercepting operations before @before, intercepting operations @after, and intercepting surround Operation @around.When to
String and character
Method name
Method type
Method description
Public String (char[] value)
Construction method
Converts the specified array of characters into a string
Public
Objective
Recently developed a project, because the project in the entire development process in a hurry state (almost every project), so the project in the closing phase of the discovery of the lack of logging system log function, the previous
Inheritance is the creation of a new type based on an existing type, either by adding new methods or by redefining the existing methods (overrides). Inheritance is one of the three basic features of object-oriented-encapsulation, inheritance,
Underlying data type SelThe SEL, also called the selector, is a pointer to the selector that represents a method, which is defined as follows:typedef struct objc_selector *SEL;The detailed definition of the objc_selector struct is not found in the
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.