Swift 开发笔记

Swift语言2.2中文版

cocoapods:常用命令

开源第三方:123...

APNs使用及解析

Swift语言参考

斯坦福大学Swift

AutoLayout使用

探索 Swift 中的 MVC-N 模式

Swift编程风格指南 http://www.cocoachina.com/swift/20160701/16894.html

图标素材

环信开源13个开源项目:http://community.easemob.com/article/825307813
好用的第三方:
视频启动页:VideoSplashKit
折叠 Cell:folding-cell
弹窗菜单: tumblr

http://samvlu.com/index.html 100 Days
Swift_100days

自定义相机: https://github.com/AlexLittlejohn/ALCameraViewController

tableView 原理

OC 转 Swift http://iswift.org/try

ASO关键词:http://aso114.com/

100 项目练习:100DaysOfSwift

人脸识别API:http://blog.csdn.net/xiaxiazls/article/details/46821627

3D Touch 开发
http://blog.csdn.net/bjtufang/article/details/48960209

StyleKit

http://blog.csdn.net/xdonx/article/details/8860310

逻辑关系

1.视图跳转逻辑关系
present -> 会先执行 viewDidLoad 方法 -> 页面
push -> 先跳转页面 -> 再执行viewDidlLoad 方法
2.类里面的变量先后关系

大小写及符号

1.字符串标识符
2.如 = 与 == 编译器不会报错,又难以看出

好看的tableview动画 BMCustomTableView

更新 cocopods 问题

项目target

http://www.cnblogs.com/linguanh/p/5683069.html

开源盛会 https://github.com/dkhamsing/open-source-ios-apps/blob/master/README.md

字典语法+

        我们也可以使用下标语法来改变特定键对应的值:
        
        airports["LHR"] = "London Heathrow"
        // "LHR"对应的值 被改为 "London Heathrow
        作为另一种下标方法,字典的updateValue(_:forKey:)方法可以设置或者更新特定键对应的值。就像上面所示的下标示例,updateValue(_:forKey:)方法在这个键不存在对应值的时候会设置新值或者在存在时更新已存在的值。和上面的下标方法不同的,updateValue(_:forKey:)这个方法返回更新值之前的原值。这样使得我们可以检查更新是否成功。
        
        updateValue(_:forKey:)方法会返回对应值的类型的可选值。举例来说:对于存储String值的字典,这个函数会返回一个String?或者“可选 String”类型的值。
        
        如果有值存在于更新前,则这个可选值包含了旧值,否则它将会是nil。
        
        if let oldValue = airports.updateValue("Dublin Airport", forKey: "DUB") {
            print("The old value for DUB was \(oldValue).")
        }
        // 输出 "The old value for DUB was Dublin."
        我们也可以使用下标语法来在字典中检索特定键对应的值。因为有可能请求的键没有对应的值存在,字典的下标访问会返回对应值的类型的可选值。如果这个字典包含请求键所对应的值,下标会返回一个包含这个存在值的可选值,否则将返回nil:
        
        if let airportName = airports["DUB"] {
            print("The name of the airport is \(airportName).")
        } else {
            print("That airport is not in the airports dictionary.")
        }
        // 打印 "The name of the airport is Dublin Airport."
        我们还可以使用下标语法来通过给某个键的对应值赋值为nil来从字典里移除一个键值对:
        
        airports["APL"] = "Apple Internation"
        // "Apple Internation" 不是真的 APL 机场, 删除它
        airports["APL"] = nil
        // APL 现在被移除了
        

        通过访问keys或者values属性,我们也可以遍历字典的键或者值:
        
        for airportCode in airports.keys {
            print("Airport code: \(airportCode)")
        }
        // Airport code: YYZ
        // Airport code: LHR
        
        for airportName in airports.values {
            print("Airport name: \(airportName)")
        }
        // Airport name: Toronto Pearson
        // Airport name: London Heathrow
        如果我们只是需要使用某个字典的键集合或者值集合来作为某个接受Array实例的 API 的参数,可以直接使用keys或者values属性构造一个新数组:
        
        let airportCodes = [String](airports.keys)
        // airportCodes 是 ["YYZ", "LHR"]
        
        let airportNames = [String](airports.values)
        // airportNames 是 ["Toronto Pearson", "London Heathrow"]
        Swift 的字典类型是无序集合类型。为了以特定的顺序遍历字典的键或值,可以对字典的keys或values属性使用sort()方法。

你可能感兴趣的:(Swift 开发笔记)