We first assume that we have created a class now, and we are named MyObject, and inherit from NSObject. Inheritance know, it is you this subclass (MyObject) If you do not write anything, and the parent class (NSObject) is exactly the same. Almost
Git address: Http://git.oschina.net/feiji1hao/NZOCJSBridge Project is a middleware that provides objective-c and JavaScript communication for hybrid development Simply copy the catalog Nzocjsbridge to your project and bring your demo with you, and
The UI elements (buttons, lists, pictures ...) that we can see on the screen when we use the app, which we call views, are inherited and UIView, they usually have properties such as location, size, background color, and in Appl View and window show
Test Address: http://www.eosgarden.com/en/articles/objc-quizz/take/This is a few days ago friends shared obj-c test questions, a total of 57 questions. Self-Mastery OC I went to do the next test, the result has been a more serious psychological blow,
category (category, Extension)(i) Division of Classifications(2) 1, (named category) categoryCategory: Only new methods can be added and new variables cannot be added. 2. Extensions of (unnamed category) classesExtension://extensions are generally
In the previous three articles about data persistence, we all use files (plist files, database files) that are stored in the document directory. The file mechanism of iOS is a sandbox mechanism where apps can only access files in their own app
Factory method ModeFactory method mode controls the creation of objects, masks the details of object creation, and directly creates the objects we need to be configured.The factory method pattern defines the interface for creating methods, letting
1. CategoryThe class is to add a new method to the existing class. However, you cannot add an instance variable. such as the system class, we do not see his. m files, so there is no way to directly add methods to implement.What are the usage
The Get element method for the container (Nsmutablearray, nsmutabledictionary) Objectforkey: Returns the ID type,Convert Nsinteger type, using IntegerValue.// newQuestion is an NSDictionary defined somewhereNSInteger questionId = [[newQuestion
For objective-c array Nsarray can only save objects, cannot access the base data type, such as Integer int, float float, double-precision floating-point double, char Char, but objective-c in order to be able to save the base data type to an array,
Chapter 12th CategoryCategory:Naming method: Class name + category name.In Xcode, you can find the Objective-c category icon in the category of the new file.@interface sectionThe declaration of a category looks much like the declaration of a
Manual memory Management MRCFirst introduce the reference counter : To save the current object there are several things to use it (number)the role of the reference counter : To determine whether the object should reclaim memory space (if the object
Appearance modeThe design pattern is the same as the adapter, but it has a different granularity to the object control, and the adapter generally controls the docking of a system and client. The façade is used to abstract multiple systems working
Block data typeBlock encapsulates a piece of code that can be executed at any timeA block can be used as a function parameter or as a return value of a function and can have an input parameter or return value itself.Apple's official recommendation
Introduction to the excellent OBJECTIVE-C project on GitHubMake a brief introduction to the current GitHub top projects, so that you get a quick overview of some of Objective-c's best open source frameworks.
Project Name
Project
Autorelease Pool Usage Precautions:
Under ARC, you cannot use [[NSAutoreleasePool alloc] init], but you should use @autoreleasepool;
Do not put a large number of cyclic operations between the same nsautoreleasepool, which will cause memory
Rules:
When you create an object using the new, alloc, or Copy method, the value of the reserved counter for the object is 1. When the object is no longer being used, you should send a release or autorelease message to the object. In this
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