. H: Header file. The header file contains class, type, function, and constant declarations.. M:Source codeFile. This is a typical sourceCodeFile Extension, which can contain objective-C and C code.. Mm:Source code file. Source code files with such
The classification mechanism allows you to add new method declarations to a class file. It does not need to use the subclass mechanism and defines these methods under the same name in the class implementation file.
# Import "classname. h"
@
"Multi-inheritance" of objective-C"
When single inheritance is not enough and it is difficult to model the problem domain, we usually think of Multi-inheritance directly. Multi-inheritance is the ability to derive from an additional direct base
The Protocol application calls each other between two controllers or between the Controller and the custom uiview.
Its Applications are similar to interfaces in Java or C. Assume that a calls B and B calls back a, so we can design it as
The interface is often used during iPhone development. Apple has designed a good management idea for it, that is, using the common MVC mode. In the iPhone, all graphical controls are inherited from uiview, that is, "V ". uiview and its Child classes
In objective-C language, there are two ways to pass the method: ① selector ② blocks. This article mainly describes selector. blocks will be summarized later.
Message Passing is the core mechanism of objective-C language. In objective-C, there is no
Document directory
Dynamic Method Analysis
@ Dynamic refers to the Code provided by developers: setter is required for read-only attributes, and setter and getter are required for read/write attributes.@ Synthesize indicates that, unless the
Document directory
Dynamic types (iskindofclass, ismemberofclass, ID) of objective-C syntax
Dynamic types (iskindofclass, ismemberofclass, ID) of objective-C syntax
The ability of an object to obtain its type at runtime is called introspection.
Set a set of first-level single-value objects, which can be variable or unchanged. Operations include: searching, adding, and deleting members in a set (common to variable sets), comparing two sets, and calculating the intersection and union of the
The Foundation framework allows you to use the file system to perform basic operations on files or directories. These basic operations are provided by the NSFileManager class,
Methods of this class have the following functions:
Create a new file
Path: NSPathUtilities. h
NSPathUtilities. h contains NSString functions and classification extensions, which allow you to operate on the path name.
The following is an example:
# Import # import # import # import # import int main
Link to the original article: a large number of objective-c developers have emerged in the past few years at http://pilky.me/view/21. Some are transferred from dynamic languages, such as Ruby or Python, and some are transferred from strong languages,
The id type has been predefined as the pointer type.
Accessors
Certificate -----------------------------------------------------------------------------------------------------------------------------------
In Objective-C, all instance variables
Document directory
Http://fei263.blog.163.com/blog/static/9279372420113193523828/
Block
Http://fei263.blog.163.com/blog/static/9279372420113193523828/Block
Apple uses the extension Statement C, objective-C, C ++, and block. Currently, only Mac 10
Address: http://www.mulle-kybernetik.com/weblog/2011/10/how_to_build_libobjc_for_ OS _x.html
Max OS X: 10.6.8
Version to be compiled and run: 437.3
I just tried it myself and can compile it.
In addition, the header file contains an absolute path. If
In Windows, there are two main types of hooks: Message hooks and function hooks. Sometimes you must use hooks when implementing some functions.
The function hook is mainly used to replace the entry address. In a broad sense, many things are hooks,
No matter how perfect a class design is, there will inevitably be unpredictable demands. How can we expand the existing class? Of course, inheritance is a good choice. However, Objective-C provides a special way to extend the class, called Catagory.
Document directory
NSNumber
NSArray
NSDictionary
Apple made significant improvements to Objective-C and LLVM compilers at WWDC 2012 this year. The new features added by Objective-C are as follows:1. Method order independence
The Objective-C
Note: This Objective-C topic is a prelude to iOS development. It also helps programmers with experience in object-oriented language development to quickly get started with Objective-C. If you have no programming experience or are not interested in
Show Excel I will not introduce, most people know that you can use the UIWebView control, so directly go to the code
//// ViewController. m // PRJ_excelDemo /// Created by wangzhipeng on 13-4-12. // Copyright (c) 2013 com. comsoft. all rights
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