Unified style questions about the translation

First, this translation is not an open source translation,According to the future income from donations,Members will be compensated (perhaps not

Secondly, as a contributor to translate your cool is a prerequisite。

 

basic rules

  • First you will get an author of this blog account,With this number in this blog post your translation,Translating chapters use the "Save Draft" feature continuously updated。- I can see you have saved draft,So I know what you are taking up the pit,How much translation。
  • Add code using the editor of the first row of the rightmost <&g[……]

    Click link to continue reading...

How to hide text statistical code

In General,We will use statistical code when creating a third-party independent blog to monitor the blog visits,In order to obtain some small sense of accomplishment ~

In short,When those statistics add tags they always seize the opportunity to give your own website advertising - word "Webmaster Statistics" and other nasty hidden in calling in,You can not afford to also clear how。

Other,Even if unrealistic Text,There nonsense pictures show,I rely,They are designed for it, no matter what topic you can always get on the subject of the greatest degree of holdingabsoluteNot compatible。

In short,We have to think to do[……]

Click link to continue reading...

Swift developer's SDK

In Xcode 6.3 middle,We worked Objective-C adds new Null tag Language features。This feature gives a Objective-C language and the same expression Swift empty and non-empty kind of API Interface。Xcode 7 Through the introduction to Objective-C lightweight generic module allows Objective-C communications more natural and Swift。Generics allow two languages ​​secure communication and sharing to save the collection of specific types of elements。

These features are useful for any writing[……]

Click link to continue reading...

Generics

Generics are another important object-oriented concepts in,In addition to multi-state,It further increases the range of reuse code,For Swift language,,Generics throughout its always。

From Print() Speaking

We start from the first day of class in the use of this global function,It allows us to show the statement on the screen,Very simple to use,It can pass a string。

Incoming string displayed string,Incoming shaping on the digital display ......

and many more! As a function,How can it receives two different parameters!

ok we use[……]

Click link to continue reading...

Always given:Exception Handling

This lesson we get to know about the Swift error handling

In calling the method and the time to write a wheel,There will always be wrong sorts of weird,Normal is already compiled software,Some unexpected errors also occur。but,Among these errors,There are some that can be identified and captured - they can be expected。

Predictable error

Why do we say that there are some errors that can be expected to get it? For example, reading a file when the file does not exist、Save a document when the directory is not writable、Download the file when no network connection、transmit a parameter[……]

Click link to continue reading...

Static methods and static properties

Not all of the dynamic

we all know,The method is put in the running instance。That is the result of the implementation of the method is based on the instance property came,The property is an example of the current state of change - we call it "dynamic"。

But really all it is dynamic? In fact, not,Some methods give results which will directly and according to your call,It does not need to change according to the change of the instance attribute-that is to say, it will produce a definite result anyway,We call such methods static methods,It is static。

Let's take a look:
[crayo[……]

Click link to continue reading...

Lifetime:Automatic Reference Counting

In front of so many bedding,Now finally we want to address this thing the garbage collector。

ARC

This is not the Ark ...... This is automatic reference counting (Automatic Reference Counting),This thing is used to manage Apple memory。

Its function is that the garbage collector on the garbage heap。It would not have been able to ensure that all heap objects that reside in the running to be released in the heap。It ensures that memory will be reallocated to other objects to be used。

What is released

Speaking of the object will not be taken away to the garbage collector,Then it depends on the citation meeting[……]

Click link to continue reading...

Initializer

At the end of the previous lesson,We finally made clear the process of creating an object,Then,Speaking create an object looks like is to call a method,This method may in the end what is it?

Initializer

Not wrong,When we initialize a class object when,We did call a method - initializer。

Initializer method is actually a special provision of the,It is possible for the class to initialize。

Let's imagine,If no initializer,So we call the class will certainly be stereotyped,Every time they have to create an object,Then modify its properties?[……]

Click link to continue reading...

"Stack":In the end what happened "heap",What is a "stack"?

It's time to look at the living space objects and methods - and want to learn object-oriented,I do not know where to put the methods and objects is a very embarrassing thing - after all, we still have to face the garbage collector,Want to make the garbage collector to help you do more,We have to understand its working mechanism to some extent,Learn how and where to store objects,if not,You have to write a program to the vulnerable!

We have already mentioned the basic concept of the heap in front of the course which,Yes,Objects (instances) is placed on the heap - I put it vividly described as "garbage"。

Be piled[……]

Click link to continue reading...