1, first come to a few commonly used:
is the HD screen
#define Isretina ([UIScreen instancesrespondtoselector: @selector (currentmode)]? Cgsizeequaltosize (Cgsizemake (640, 960), [[UIScreen Mainscreen] currentmode].size): NO)
//whether
The article turns from
@implementation Son:father
-(ID) init{
self = [super init];
if (self) {
} return
self;
}
This is an ordinary to initialization method that invokes the Init implementation of the parent class before the
#import int main (int argc, const char * argv[]) {@autoreleasepool {//Dictionary /* Dictionary Nsdictionnary//nsmutabledictionary 1. Concept: A dictionary is a set of keywords: ' key ' and its defined values ' value ', and it is a collection of key-
First, OC Introduction1.OC is an object-oriented programming, the main decomposition of the problem composed of objects, coordinate the object to contact and communication to solve the problem.2.C language is a process-oriented idea, which analyzes
The first thing to note is:" Auto Reference Count " (Automatic Reference counting, ARC, see 30th) is not " exceptionally safe " by default (Exception safe). Specifically, this means that if an exception is thrown, the object that should have been
OC is an enhanced C feature, so it is basically consistent with C on variables and basic data types.In OC, variable naming has the following rules:Consists of letters, numbers, underscores, and $ symbolsMust start with a letter, underscore, $
Remember that when you first learned OC, it was always unclear to instance variables and attributes.For example, when printing the name of the person class object in the code below, when to use name with "_",NSLog (@ "%@",p1->_name); When to
Understanding Method Swizzling is a good opportunity to learn the runtime mechanism. Not much to do in this, only translated by Mattt Thompson published in Nshipster's method swizzling article.Method Swizzling is a technique that changes the actual
Nsarray ordered Natural orderNsset disorderly.Nsset cannot store duplicate data, it can be used to remove duplicate data1. Create a Collection1.1 Creating immutable Collections 1Nsset *Set= [[Nsset alloc] Initwithobjects:@" One",@" Both",@"three",
We discussed the processing of classes and objects in runtime, and the handling of member variables and attributes. In this chapter, we're going to start talking about the most interesting part of runtime: the message handling mechanism. We will
Understanding Method Swizzling is a good opportunity to learn the runtime mechanism. Not much to do in this, only translated by Mattt Thompson published in Nshipster's method swizzling article.Method Swizzling is a technique that changes the actual
The first word Official Code specificationOBJECTIVE-C coding specifications, the content from Apple, Google's document translation, their own coding experience and the summary of other materials.ProfileObjective-c is an object-oriented, dynamic
The API for optional parameters in Objective-c is also table-like:-(Instancetype) Initwithformat: (NSString *) format, ... Ns_format_function, -(instancetype) Initwithtitle: (NSString *) title message :(NSString *) message delegate: (ID/**/)
http://blog.csdn.net/cooldragon/article/details/18991973There are many ORM-based frameworks in iOS development, such as Sqlitepersistentobject, where there are different requirements or scenarios in real-world development, and different ways of
ARC Features and judging criteria/* ARC's judging criteria: as long as there is no strong pointer to the object, it will release the object 1.ARC feature 1> does not allow calls to release, retain, Retaincount 2> allow override Dealloc, but does not
More recent time, want to learn iOS development, after a multi-study or decided to learn from OC, from the basic OC grammar slowly toward the cocoa framework of learning.OC's Introductory language I I choose the most new version of the OBJECTIVE-C
When you write a objective-c program, you always use a few classes, which belong to the foundation framework. While it is technically possible to write objective-c code without the foundation framework, it is often used in this framework. These
The classification in objective-c allows us to augment it by adding a method to a class (but we cannot add new instance variables through category), and we do not need to access the code in the class.The protocol in OBJECTIVE-C is a ubiquitous
IOS operators are similar to other programming languages. All have arithmetic operators, assignment operators, comparison operators, logical operators, bitwise operators, and so on.1. Arithmetic operatorsAddition: +Subtraction:-Multiplication:
When setter, Getter,
In oC, the method for assigning Zhi to the instance variable is called setter)
The method used to read the instance variable value is called getter)
The value assignment methods we wrote earlier can be called setter and
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.