Common methods of NSNumber
Why use a numeric object NSNumber when you have a data type for int in objective-c? This is because many classes, such as Nsarray, require the use of objects, and int is not an object.NSNumber is a digital object we can
turn from: http://blog.jobbole.com/45963/
In the past few years, a lot of objective-c developers have emerged. Some are turned from dynamic languages, such as Ruby or Python, and some are transferred from a strongly typed language, such as Java or
Block closure is a relatively advanced concept in OC. We understand by simple code:
#import
#import "AppDelegate.h"
//code block declaration; return value int, parameter type int, int;
int (^max) (int,int );
typedef void (^sayhello) ();
int
Original Http://tutuge.me/2015/03/21/effective-objective-c-5-enum/?utm_source=tuicool&utm_medium=referral PrefaceEnums, which are enumerations, start with the C language, C + +, Java, objective-c, Swift, all of which have corresponding enumeration
Read the Horky classmate's "mixed use objective-c,c++ and objective-c++" blog, I also have some ideas to record, easy to learn in the future1.objective-c/C + +/C depth blending is not a good choice, prone to error, and poorly maintained, and when
Appearance mode (facade), which provides a consistent interface for a set of interfaces in a subsystem, defines a high-level interface that makes this subsystem easier to use.You can consider using the appearance mode in the following cases: (1) The
The first type: (The simplest nsdate)NSDate* tmpStartData = [NSDate date];//You code here...double deltaTime = [[NSDate date] timeIntervalSinceDate:tmpStartData];NSLog(@"cost time = %f", deltaTime);The second type: (Put the running code in the block
In Objective-c, the invocation method takes a message-passing mechanism.Reference article: http://blog.csdn.net/xingyevc/article/details/39397873If a message is passed to an object, the dynamic binding mechanism of OC is used to determine the method
Words don't say much, learn so much, write a quick sort first.In addition to the Quick platoon, there is time to add heap, merge and so on.Learned today, classes, protocols, grammars.Because the algorithm class, more than one algorithm. So create a
ARC mechanism and judging criteria
Arc:auto Reference counting Automatic reference countis a compiler mechanism to add retain, release, Autorelease and other methods to our code during the compilation process.Forced to use after iOS7.0, so that
SELIn Objective-c, the SEL is a type of selector (selector). A selector is a pointer to a method, and the reader can simply understand that running the program here will execute the specified method, so you can define a selector:
SEL action
Http://www.tuicool.com/articles/ERvUbmR1. If the return value of the method is newly created, the first word of the method name should be the return value type, unless there is a modifier such as localizedstring;2. The noun representing the
want to improve the next to do the application to the customer to take the experience, so watched a few days OC Caanimation Animation class, also done a few small cases, the following individual cases to do as the main content of this article. One:
This article turns from: Http://blog.csdn.net/yuquan0821/article/details/6646400/, overviewKVO, Key-value Observing, provides a mechanism for the object to receive notification when the properties of the specified object have been modified. Simply
Http://www.infoq.com/cn/articles/wwdc2012-objective-c-new-feature
At WWDC 2012 this year, Apple made significant improvements to both objective-C and llvm compilers. Let's take a look at what new features have been added to objective-C.
1. Method
Multi-Inheritance
Objective-C does not support multi-inheritance, but we have methods to implement pseudo-inheritance.
For example, if object A is added, it cannot process the message fun, But object B can process the message. In this case, object A
Form http://topic.csdn.net/u/20091212/14/eed674bc-b074-4269-8450-f9ca659103c0.html
1. The biggest difference: all are object-oriented languages evolved from C.
2. The biggest difference is that C ++ is a static language, while OC is a dynamic
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