Swift 学习指引

以下指引是基于最新的 Swift 4.0 为基础为而言. 如你在参考3.0以下版本, 那你就不要说你会 Swift, 3.0 之前是 Objective-C 的搬迁(80%),是不成熟的语言, 看着很别扭的语言;  3.0 之后完全脱去 Objective-C 的搬迁阴影..., 是一门全新的语言.

但不得不说在 Objective-C 的基础之上学习 Swift 会更快入手.

学习Swift,从这里开始!

http://special.csdncms.csdn.net/the-swift-programming-language-in-chinese/index.shtml

《The Swift Programming Language》 官方 API

https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/TheBasics.html#//apple_ref/doc/uid/TP40014097-CH5-ID309 

Swift 初级语法

https://i.cnblogs.com/posts?categoryid=1007680

Swift 高级

https://i.cnblogs.com/posts?categoryid=984671

Swift 2.0到3.0 的迁移变化常见错误链接:

http://www.cnblogs.com/gongyuhonglou/p/6108240.html

http://www.jianshu.com/p/27fd2a2b32e4

http://www.jianshu.com/p/af5d2b28b9e4

http://blog.csdn.net/ios_qing/article/details/52812187

http://www.jianshu.com/p/6dddf360493b

✨✨✨

推荐敏捷大拇指(Swift 3.0最新的迁移变动):

 http://www.swifthumb.com/thread-14893-1-1.html 

 http://www.swifthumb.com/forum-72-1.html

github swift-evolution 参考链接:

https://github.com/apple/swift-evolution/tree/master/proposals 

 常用第三方大全:

“轮子”工具类

  • SwiftyJSON:GitHub上最为开发者认可的JSON解析类
  • Dollar.swift:Swift版Lo-Dash(或underscore)函数式工具库
  • OAuthSwift:国外主流网站OAuth授权类库
  • PathKit:小而美的路径管理类
  • XCGLogger:功能完整的日志管理类库
  • Surge:基于苹果Accelerate高性能计算框架封装库
  • Async:简洁的后台执行代码封装库
  • Euler:直观、简洁的数学表达式∛27÷3+∑[3,1,2]
  • LocationManager:地理位置管理封装库
  • Siren:当应用更新时,通知用户并提供App Store链接
  • BrightFutures:漫长或复杂计算由独立线程异步来完成


存储类

  • SQLite.swift:简单、轻量,使用上最SQL的SQLite封装库
  • Realm:志向代替Core Data和SQLite的移动数据库


网络类


图片类

  • ImageScout:最小网络代价获得图片大小及类型
  • DominantColor:提取图片主色示例项目
  • Toucan:小而美的图片变换及处理类
  • gifu:高性能GIF显示类库
  • HanekeSwift:轻量带缓存高性能图片加载组件
  • Kingfisher ------ 图片加载库 Swift版的SD


界面类


框架类

  • AsyncDisplayKit:提供界面的高流畅性切换及更灵敏的响应
  • Cartography:基于代码级的自动布局封装框架, 同 Mansory
  • MMWormhole:iOS扩展与宿主应用的通讯框架
  • NetworkObjects:轻量版HttpServer框架,跨平台解决方案


“车子”示例项目


完整应用

      • edhita:支持Markdown, HTML预览的文本编辑器
      • firefox-ios:来自Mozilla开发团队大型纯Swift项目
      • SwiftWeather:清新淡雅持续改进天气预报项目
      • VPNOn:驻在通知中心内的VPN开关应用
常用第三方库列表且支持 cocoaPods,供快速查询:
  1. IGListKit [UICollectionView 框架] -> pod 'IGListKit', '~> 2.0.0
  2. Realm [移动端数据库] -> pod 'RealmSwift’
  3. Moya [抽象网络层] -> pod 'Moya', ‘8.0.0’
  4. SwiftyJSON [JSON 解析] -> pod 'SwiftyJSON’
  5. Valet [钥匙串帮手] -> pod 'Valet’
  6. Firebase Analytics [分析] -> pod 'Firebase/Core’
  7. AsyncDisplayKit [异步 UI SDK] -> pod 'AsyncDisplayKit’
  8. DZNEmptyDataSet [空状态模式] -> pod 'DZNEmptyDataSet’
  9. Chameleon [扁平化颜色框架] -> pod 'ChameleonFramework/Swift', :git => 'ViccAlexander/Chameleon'
  10. PermissionScope [iOS 权限框架] -> pod 'PermissionScope’
  11. FileKit [文件管理] -> pod 'FileKit', '~> 4.0.0’
  12. SwiftyUserDefaults [user defaults 帮手] -> pod 'SwiftyUserDefaults’
  13. Kingfisher [下载图片] -> pod 'Kingfisher', '~> 3.0’
  14. Hero [自定义试图控制器过渡动画] -> pod 'Hero’
  15. Hedwig [发送 email]
  16. DeviceKit [设备信息] -> pod 'DeviceKit', '~> 1.0’
  17. Charts [图表] -> pod 'Charts’
  18. MGSwipeTableCell [可以滑动的 table cells] -> pod 'MGSwipeTableCell’
  19. RandomKit [随机生成数字] -> pod 'RandomKit', '~> 3.0.0’
  20. ResponseDetective [调适网络请求] -> pod 'ResponseDetective’
  21. Onboard [用户指导页] -> pod 'Onboard’
  22. Quick + Nimble [BDD 测试] -> pod 'Quick’
    pod 'Nimble’
  23. Natalie [从 storyboard 生成代码]
  24. RxSwift [reactive 编程] -> pod 'RxSwift', '~> 3.0’
  25. GDPerformanceView [实时 FPS and CPU 用量] -> pod 'GDPerformanceView-Swift', '~> 1.1.0’
  26. Alamofire [网络] -> pod 'Alamofire', '~> 4.3’
  27. SwiftyStoreKit [app 内购] -> pod 'SwiftyStoreKit’
  28. Timepiece [date 帮手] -> pod 'Timepiece’
  29. CryptoSwift [加密] -> pod 'CryptoSwift’
  30. FSCalendar [日历] -> pod 'FSCalendar’
  31. ImageViewer [模仿 Twitter 的图片查看器] -> pod 'ImageViewer’
  32. PromiseKit [promises] -> pod 'PromiseKit', '~> 4.0’
  33. Ensembles [Core Data 同步] -> pod 'Ensembles’
  34. Reachability.swift 网络监听  Swift 4.0 -> 
    pod 'ReachabilitySwift', :branch => 'develop'

在你看完这些之后, 恭喜你, 你的 Swift 水平已经同你的 Objective-C 水平有一拼了. 请点赞,谢谢.

原文地址:https://www.cnblogs.com/lurenq/p/7154552.html