Skip to content

Commit

Permalink
Update SwiftOldDriver#11.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoaay authored Mar 18, 2018
1 parent 4c25bb5 commit 71cd461
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Reports/#11.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ Apple 宣布 WWDC 2018 将于 6 月 4 日至 8 日在圣何塞举行,现已开

[NSBundle](https://developer.apple.com/documentation/foundation/bundle) 是我们开发中的常见类,但苹果并没有提供直接通过 `[NSBundle current]` 方便地获得当前的 bundle 的 API。于是该文作者与其朋友开了个脑洞,通过 `backtrace()` 来获取调用者的函数指针,进而再使用 `dladdr()` 来得到该函数所在的库路径,最后通过这个路径去 `allBundles` 和 `allFrameworks` 中匹配,来实现了 `[NSBundle current]` 方法。

### 🐕 [不同角度看问题 - 从 Codable 到 Swift 元编程](https://onevcat.com/2018/03/swift-meta/)

喵神新文,围绕“将一个类型转换为字典”这个问题,向读者介绍了三种解决思路和实现细节:CodableMirror 以及代码生成而更为重要的点在于喵神想传递的思想:如何利用“元编程”的思维来解决项目中碰到的重复体力劳动问题(PS:喵神最近开通了[小专栏](https://xiaozhuanlan.com/onevcat),非常值得关注!)

### 🐎 [快速用上 Swift 静态库](https://blog.dianqk.org/2018/03/08/use-static-framework/)

文章记录了作者在 Swift 静态库上使用的一些实践作者使用了一个比较 trick 的技巧,通过在 Podfile 中添加自定义脚本的方式,快速为每个第三方库添加 static_framework 支持不过因为是实践类型的,如果要引入到自己的项目中,可能还会有一些坑需要自己处理

## 设计

### 🐕 🚧 [Designing a better notification experience for iOS](https://uxdesign.cc/designing-a-better-notification-experience-for-ios-def1df8e89e8)
Expand Down

0 comments on commit 71cd461

Please sign in to comment.