第20月第17天 mvvm 多次点击push -ObjC

1.

响应式库EasyReact建成后,为了能使其得到更好的利用,更好地降低使用的理解和学习成本,臧成威老师又带领团队开发了基于响应式的MVVM框架:EasyMVVM。

https://www.jianshu.com/p/77b05dc9e3ec

http://cloud.51cto.com/art/201804/569786.htm

2.多次点击push

override func performSegueWithIdentifier(identifier: String, sender: AnyObject?) {
if let navigationController = navigationController {
    guard navigationController.topViewController == self else {
        return
    }
}

super.performSegueWithIdentifier(identifier, sender: sender)
}

https://www.jianshu.com/p/66ca4478486d

3.

1、在静态库中如果我们使用了category扩展方法,不管是系统的还是自定义的类如果没有添加-Objc相关标志,都会抛出unrecognized selector sent to instance 异常

2、在测试sdk的时候一定要和发布包操作环境一样,不然真的不知道哪个环节坑了自己,最重要的是还坑了队友。

3、在sdk这种要提供给第三方使用的代码里面减少使用category这种类似黑科技的特性,因为我们不能确保用户会增加-ObjC链接标志,因为如果我们只是在静态库编译的时候加上这个标志,用户没有加上也同样会抛出异常




https://github.com/OldGhost366/BlogCode

https://www.jianshu.com/p/8bbb1c38d3ac

原文地址:https://www.cnblogs.com/javastart/p/9050027.html