① Reduction AbbreviationsNamed abbreviations are used only for generic professional terms, such as, URL non-self-creating named abbreviations, such as Ctr , Msg . The name is rather longer and not difficult to understand.② of ProcessUse before the
The following is only for individual reading notes, to record the use of pages. Original address: HTTPS://GITHUB.COM/OA414/OBJC-ZEN-BOOK-CN thanks! One, one case problemRefer to the previous single abuse article.Http://www.cnblogs.com/yaann/p/4661909
1. Agent First KnowledgeSuppose the boss needs to buy a computer for the worker to buyThe boss needs an agent to buy a computer for the worker.Boss creates a protocol protocol for the method of buying a computerBosses have a class of attribute
1 Sending a messageThe real fun is accompanied by the "sending messages" began. Sending a message would be the basic building block of your objective-c apps because it's how do you tell an object to Perfor M some action or to give you some piece of
1. Classification (category)Using classification in OBJECT-C is a compile-time tool that allows us to augment it by adding a method to a class (but not adding new instance variables through category), and we do not need to access the code in the
Original link: http://blog.leichunfeng.com/blog/2015/06/26/objective-c-associated-objects-implementation-principle/ We know that in objective-c, you can add attributes to an existing class by category, but you can't add an instance variable, which
objective-cObjective-c extends the C language and joins the object-oriented and Smalltalk messaging mechanisms. The core of this extension is a runtime library written in C and compiled languages. It is the cornerstone of Objective-c object-oriented
Polymorphism literally means "multiple states." In object-oriented languages, many different implementations of interfaces are polymorphic. Polymorphism is a technique that allows you to set a parent object to be equal to one or more of his child
Objective-cObjective-c extends the C language and joins the object-oriented and Smalltalk messaging mechanisms. The core of this extension is a runtime library written in C and compiled languages. It is the cornerstone of Objective-c object-oriented
Delegate modeTipThe delegate object should not be retainThe class that implements the delegate pattern should:
Has an instance variable named Delegate_ to refer to the delegate.
Therefore, accessor methods should be named Delegate and
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
Dynamic languageOC is a dynamic language, and its method, the type of object, is to be determined only when it is run. So this makes OC a powerful mechanism for associating objects.Associating objectsThe so-called associative object, in fact, is
OC Block actually functions like C language function pointers, JS in the closure and so on. The code block acts as a variable, with its own variables and scopes.Simply look at the syntax of block and the possible problems:Block Syntax:Block syntax
The 16th chapter of the book on the operation of the file and directory, the content is relatively simple, again skipped.The 17th chapter of the study notes by myself summarized and presented to you.Memory Management:-Use memory management to clean
In the Cocoa Foundation, Nsset and Nsmutableset, like the nsarray functional nature, are used to store objects that belong to a collection. However, Nsset and Nsmutableset are unordered, guaranteeing the uniqueness of the data and will not have any
When you create an object using new, the system actually performs two steps in the background:The first step: Allocate memory for the object, that is, the object obtains a memory block to hold the instance variable;Second part: The Init method is
1//Initialize an empty dictionary2//nsdictionary *dictionary = [[Nsdictionary alloc] init];3//Initialize an empty code4//nsdictionary *dictionary1 = [Nsdictionary dictionary];5//add a pair of key values while initializing6//Nsdictionary *dictionary2
Original link: The official raywenderlich.com objective-c style guide
Original Author: raywenderlich.com Team
Version: raywenderlich.com objective-c Coding Specification
Translator: Sam Lau
As I'm preparing to mimic the hungry app, there may
Block blocks of code/* What the block wants to know 1> how to define the block variable int (^sumblock) (int, int), void (^myblock) (), 2> How to use block encapsulation code ^ (int a, int b) { return a-B; }; ^ () {NSLog (@ "----------");}; ^ {NSLog
#import Nsinteger codelinecount (nsstring *path){ //1. Get File Manager, this is a singleton nsfilemanager *manage = [nsfilemanager defaultmanager]; //2. determine the folder or fileBOOL dir = NO;BOOL exist = [Manage fileexistsatpath:p ath
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