Swift Foreign Resources summary (the most)
These share stickers are tentatively updated every 2 days, and the main purpose is to allow you to synchronize with foreign developers, share knowledge and improve together.
For some very valuable articles, we are interested in self-translation (Huitie tell me, avoid duplication of work, then posted to the forum or their own blog can be), I will also sync the relevant links to this post.
Programming Ideas
Why Objective-c is doomed
Main points of view: 1. Swift and OBJC are doing very well for each other 2. Trends are expected Swift-first
in the future, and both the official library and the third-party library will prioritize Swift
implementation 3. Ios&os x The underlying code is based on C, C + + and assembler, while the cocoa layer is based on OBJC but can be replaced by swift, so developing a dependency on OBJC is not that strong.
Functional programming COMES to the macintosh! Introducing swift!
The author is a scientist who studies programming language design and has learned nearly 120 programming languages. He thinks Swift is an exciting combination of functional programming and object-oriented programming in a mashup language. The article is long and welcomes interested in studying and translating.
Swift, is this really objc without the C?
The author is critical of Swift's language, thinking it has lost the dynamic nature of OBJC and replaced it with a very strict type system that is closer to C++,java and C # than Apple's so-called OjbC without the C
.
You can discuss this with this article: why it had-be Swift
Code and Tricks
Understanding Swift ' s reduce Method
Describes the use of built-in functions in Swift reduce
. For more information on built-in functions, please refer to http://swiftist.org/topics/126
Randomly shuffle a Swift array
Introduce shuffle
an implementation of scrambled array (algorithm)
Making Http Requests in Swift
Describes how to use to NSURLConnection
implement network requests. For more HTTP related content, please refer to http://swiftist.org/topics/135
Goodbye blocks:passing a closure to a parameter in Swift (Xcode/ios)
Taking the UIView.animateWithDuration
method of closure as an example, this paper introduces how to replace the original in Swift Closures
Blocks
and how to simplify it Closures
.
Swift Type Conversions
By introducing the type conversion method in Swift func __conversion() -> T
, the Point
CGPoint
implicit conversion of the custom type to the tuple (x, y)
is realized.
Tools recommended
-
Swift Toolbox
Swift third Party library Daquan
-
objc.io pre-sale book "Functional Programming in Swift"
The authority of Objc.io in the iOS development circle is beyond doubt, this time they will bring the new book "Swift function Programming", recommend the interest to Swift, interested in functional programming, and conditional friends to purchase the book