This translation is exclusively licensed to SWIFTGG
Original link: objective-c pointers and Swift 2: A Simple Guide
Original Date: 2015/08/23
Translator: Mmoaay
Proofreading: NUMBBBBB
Finalized: Shanksyang
This article
Objective-c is an Apple software programming language that wants to learn, debug, and have an integrated development environment (IDE) handy. There are three types of methods for building OBJECTIVE-C's integrated development environment:1) using the
Thread synchronization is implemented in 1,objective-c:Mutexlock (mutex), Nscondition Lock (conditional lock) Message delivery2,UDP and TCP:TCP: Transmission Control Protocol, which provides connection-oriented, reliable, point-to-point
Double, float types often have unpredictable problems when you need to calculate accurately in iOS:During debugging, you can see that the Doule type D3 the value is not expected to be 9999.99 during the calculation.If important data, such as amounts,
First, you need to figure out what the class is and what the object is. (To make this clear, let's start with a chestnut: examples of objects, such as: Human is a class; a person is an object; you are an instance; the instance itself is an object.)
Navigation:Basic data TypesObject TypeID Type1. Basic Data TypesThe basic types in objective-c are the same as the basic types of C, mainly:Int,long,float,double,char,void,boolAnd so on. It is important to note that in the Foundation framework, the
first, the difference between the @dynamic and the @synthesize @property has two corresponding words, one is@synthesize, one is @dynamic. If @synthesize and @dynamic are not written, then the default is @syntheszie var =_var; The semantics of
In the MRC environment, assuming that the Ctroom object is a member variable of Ctperson, it should be noted that the code is as follows when modifying the Ctroom object:-(void) Setroom: (Ctroom *) room{It is necessary to determine whether the new
When you define a class in Objective-c, you can also use a public, private, similar to C + + to decorate member variables, as follows:[CPP]View Plaincopy
@intterface test:nsobject{
@public
int i;
INTJ;
runtime abbreviation. is the system at the time of the operation of some mechanism, the most important is the message mechanism. For the C language, the function's call will decide which function to call at compile time (see here for the C-language
Runtime: Run-time mechanismThe first thing to understand:1. What is1> runtime is a relatively low level of pure C language API, belongs to 1 C language Library, contains a lot of the underlying C language API2> usually write the OC code, in the
As a result of the recent entry, the company arranged to study freely, so there is time to effective OBJECTIVE-C 2.0 a book to study again. As a result of the narrow personal knowledge, some of the contents of the book can not be understood
The main operations of Nsarray immutable strings are: Create, enumerate, sort, and convert to NSStringAttention:Nsarray can save objects, cannot save basic data type, struct, array, pointer, nil, NULLNsarray with nil as the end identifier.Nsnull can
13.1 protocolFormal agreement: a list of names that contain methods and properties.Attention:
After adopting the protocol, the class will implement all the methods of the protocol.
Typically, a protocol has only a few methods that need
Traversal of a collection1.for Loop traversal2. Enumerator traversal1Nsarray *enumarray = @[@"CM",@"PL",@"Lina",@"NEC"];2 //creates an enumerator that is attached to an array3Nsenumerator *rator =[Enumarray Objectenumerator];4 //Create an Object5 ID
Single caseand other languages of the singleton production is not much, can be said to be the simplest of a design pattern. But there are a few points to note that a singleton is just one instance of a class.So we're going to try to stop this class
Overview
NSNumber and Nsvalue are used for boxing purposes, and the basic types of data are loaded into objects. The information given in the official documentation is clearly stated:/*nsvalue.hcopyright (c) 1994-2014, Apple Inc. All rights
Benefits of Encapsulation:
Filter for unreasonable values
The assignment process inside the Shield
Let the outside world not pay attention to the internal details
Benefits of Inheritance:
Do not change the original
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