A lot of programmers who want to develop iOS, or are developing iOS, have done Java or C + + before, when the first time to see OBJECTIVE-C code is a headache, objective-c code in the syntax and Java, C + + has a big difference, Some students will
1. InheritanceOBJECTIVE-C does not support multiple inheritance. Super Keyword: Call the parent class of the class; superclass: Another way of saying the parent class.2. Custom NSLog () output:Adding the description method to a class allows you to
ARC (is compiler feature)
ARC is a new feature that has been added since iOS 5, completely eliminating the cumbersome manual management of memory, and the compiler will automatically insert the appropriate retain, release, and autorelease
OBJECTIVE-C Study Notes1.cocoa object initialization generally uses ALLOC and init two methods, not new, where alloc is used to allocate memory, Init is used for initialization, because the initialization method returns objects that may be different
First, the concept:1. Delegate (delegate, also called agent): When an object receives an event or notification, it queries its delegate object whether it can respond to the event or notification, and if so, This object sends a message to its
It is well known that memory management in Objective-c is managed through a mechanism called "reference counters".For example, when I declare a new instanceNSData *data = [[NSData alloc] init]Now, there is an object of type NSData in memory called
Summary of common nsstring Methods
+ (ID) stringwithcontentsoffile: path encoding: ENC err
Create a new string and set it to the content of the file specified by path. Use the character encoding ENC to return an error on err.
Author: failingProgramMember-eight gods
C # demonstrates the features and functions of multiple languages. The following describes the extension methods introduced from objective-C.
The following example demonstrates an extension method defined
In the previous article, allCodeThey are all placed in the same file main. H. This is obviously not a good method. When the code is too large, it will be too big. You can split it:
1,Put all enumeration and structure definitions in one file
Objects in obj-C include nsarray, nsdictionary, nsstring, nsnumber, nsdate, nsdata, and their variable versions (nsmutablearray, nsmutabledictionary... in this way, you can easily serialize your data in a certain format (such as XML format) and save
From: http://blog.csdn.net/onlyou930/article/details/9299169classification: Objective-C2013-07-11 11: 54 3420 people read comments (0) collection reports Association is to associate two objects, so that one of the objects as part of another
The last time I read this book, I hurried through it. Recently I was not very busy. I revisited it and wrote my notes ~..
If you are interested, you can buy one. I think this book is quite good.
Because most of them are written on mobile phones when
5. Various numerical valuesNsarray and nsdictionary can only store objects, but cannot directly store any basic types of data, such as int, float, or struct. However, you can use an object to encapsulate basic values. For example, encapsulate int
1): block learning Summary
Block: used to save a piece of code.
1. Block features:1> block encapsulates a piece of code that can be executed at any time2> A block can be used as the return value of a function or function, and it can contain input
First, introduce the framework audiotool.
-(ID) initwithpath :( nsstring *) path { uint32 size, maxpacketsize; char * cookie; int I; If (gthereisanactivetrack) { nslog (@ "*** warning *** gbmusictrack only plays one track at a time! You must
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
In my spare time, I am interested in iPhone development. I want to learn how to use Objective C without Mac, so I have to go through windows.
1. Environment
Http://www.gnustep.org/experience/Windows.html download here: gnustep msys system, gnustep
The cygwin and iPhone sdks are installed in windows. After a lot of code is downloaded, the result is a mix of C objective-C. Since the company used to play C ++ games, compilation has always been a problem. I checked a lot of information and
Objective-C Memory ManagementDirectoryReference count is the only reference for memory collection of instance objectsObjective-C memory management principlesObject ownerAutoreleasepool makes objective-C a semi-automated language for Memory
@ Property: Pre-compiled commands automatically declare the setter and getter methods of attributes.Sometimes you need to declare the corresponding instance variablesWhen do I need to declare instance variables?Let's look at the following
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