Category is a great concept. You can use a category to add new methods to any class, including those you do notSource code.This is very convenient.To add a new method to a class, we usually create a subclass.However, subclass is sometimes
Http://chchwy.blogspot.com/2010/05/linux-objective-c.html
How to compile objective-C Programs on Linux
1. Sort the following packages in sequence:
Sudo apt-get-y install build-essentialSudo apt-get-y install gnustepSudo apt-Get install gobjcSudo
Because nsobject in the foundation of cocoa framework provides the javasmselector method, only two data parameters can be passed. To pass more parameters, one of the simplest methods is to use RuntimeIDObjc_msgsend (ID Self,SelOp,...) runtime
1. category can be used to add new methods for existing classes.
2. categories can be managed and implemented. Multiple methods of different categories can be put into different. M files. For example, nswindow has many categories, such as
1. Learn the C language basics first;
2. Read programming in objective-C 2.0. Do not read objective-C 2.0.
Program Design;
3. Read "cocoa Design Patterns" and "cocoa programming developer's handbook". Do not read them because they are difficult and
Numeric value to boolean type,1. nsstring contains many features. For example, it can be directly converted to the numeric type (integer or floating point type)
1Nsstring * test =@"This is my name";
2
If (Nsorderedascending = [test compare:
From: http://www.yifeiyang.net/iphone-development-techniques-of-the-tools-for-chapter-1-the-xib-file-is-converted-to-objective-c-source-code/
Nib2objc is a small conversion tool that can automatically convert XIB files to objective-CSource
Background
Singletons classes are an important concept to understand because they exhibit an extremtely useful design pattern.
This idea is used throughout the iPhone SDK, for example, uiapplication has a method called sharedapplication which when
If you define a retain property in an objective-C class, only obj. the attribute takes effect only when accessed in the form of VaR, that is, the getter/setter method of the member variable is used. Otherwise, the attribute cannot take effect. For
Recently, I plan to develop some applications for the iPhone, iPod Touch, and iPad, so I need to start learning objective C (a language similar to C developed by Apple ). Due to Apple's self-Closed Industrial Chain Development Model (from chips,
IntroductionObjective-C language keyword, paired with @ synthesize.Function: Let the compiler automatically write a method declaration with the same name as the data member to save the declaration of the read/write method.For example:1. In the
I have seen a very good article that allows you to instantly understand what delegation is.
When we talk about the protocol, the declarative protocol is a reserved method body. The specific implementation of the method is waiting for the person who
Copyright Notice
This article is copyrighted by Vince yuan (Vince. Yuan # gmail.com. Welcome to non-profit reprint, reprint must contain the original link http://vinceyuan.cnblogs.com, and must contain the complete content of this copyright
Objective-C syntax quick reference by cocoa China
10 Apr
Most beginners who have a basic development experience on other platforms are eager to see xcode. After seeing the interface builder, they are eager to get started with the objective-C syntax,
Use: @ property (nonatomic, copy)
I made a mistake on this issue today. I have been searching for a long time to find out the cause.
In addition, after a simple disassembly, the Block is stored in the static variable area, and a runtime stack is
Class:
@interface ClassA : NSObject{}@property(nonatomic, retain) Foo* foo;@end
Class B:
@interface ClassB : NSObject{Foo* foo;}@property(nonatomic, retain) Foo* foo;@end
The difference between the two classes is that the second class contains
The core class for processing strings in Objective-C is NSString and NSMutableString. These two classes process most of the functions of strings in Objective-C. The main difference between the two classes is that NSString cannot dynamically modify
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