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
Similarly, the array also has a variable form, that is, Nsmutablearray, and now we're going to implement these methods:
(1) New Person.h file, implemented as follows:
#import
@interface person:nsobject
@property (nonatomic,strong) nsstring
1. Basic concepts of category
Encapsulation is an object-oriented feature, and OC is no exception. However, sometimes we encounter a situation where we encapsulate a class and don't want to change it any more, however, we need to add a method to
Iskindofclass: returns a Boolean value that indicates whether the caller is an instance of given class or an instance of any class that inherits from that class.Ismemberofclass: returns a Boolean value that indicates whether the specified er is an
During the development process, we will encounter a lot of string operations. It is a common data type, and the usage of it is summarized below:
// 1. Create a constant string.
Nsstring * astring = @ "This IsString! ";
// 2. Create an empty string
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
Some points worth attention in objective-C: 1. there are the following aspects about bool traps: it is best to compare bool condition statements with the no value, because bool's yes and no values are only agreed, in addition, the compiler
I wanted to translate it, but I saw some translations on the Internet, so I directly reproduced it.
Original post address: http://www.i-alive.com/post/45/
English address:
How can I convert an XIB file to an object-C source code?
You can use nib2objc to download the source code of this tool from https://github.com/akosma/nib2objc.
The downloaded project code is compiled with xcode to generate a command line program
Now it's still a dish. If there's any mistake, I hope to correct it!
If reprint, please indicate Source Address: http://blog.csdn.net/shinilaobababa/article/details/8453434
First, let's take a look at the golden rule of Memory Management in OC.
If
I. golden rules for memory management:
The basic rule to Apple is everything thatincreases the reference counter with alloc, [mutable] Copy [withzone:] Or retainis in charge of the corresponding [auto] Release.
If an object uses alloc, [mutable]
Objective-C method replacement
(Method replacement for fun and profit)
This article will discuss method replacement and swizzling in objective-C ).
Overriding Methods)
Overriding methods is common in any object-oriented language and is mainly used
In IOS apps, if you want to save big object data, you can use XML files or attribute files. However, because the plain text method is not confidential enough, for example, you can encapsulate the stored data as an instance of a custom class and save
The following are the notes for learning objective-C 2.0. The original book I purchased is the original English version. Due to my limited level of English, there may be omissions in understanding.
Original book purchase address: Amazon
1.
Objective-CGrammar-something about dictionary objects
If the original Yusong Momo article is reprinted, please note: It is reprinted to my independent domain name blogYusong Momo program Research Institute, Original address:
Installed xcode 4.6 and now facing with new errors in an existing ent code I manage.
The compiler now complains about "direct access to objective-C's Isa is deprecated in favor of object_setclass () and object_getclass ()" And won't
@ Property
Introduction
Objective-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
IOSDevelopmentObjective-CAndJavascript InteractionThe operation is the content to be introduced in this article. It mainly explains the usage of stringbyevaluatingjavascriptfromstring. It is very powerful and easy to use, through this, we can easily
Nonatomic: Non-atomic access, no lock when assigning values to attributes, multi-thread concurrent access will improve performance. If this attribute is not added, both access methods are atomic transaction access by default.
(Atomic is a thread
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