![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
swift开发
feifeiwuxian
这个作者很懒,什么都没留下…
展开
-
swift之小试playground
1.怎么显示右边,所见即所得的东西如下图点击红色箭头地方的按钮,就可以了。2.关于显示 编辑助手 Just Press Alt + Command + Enter to open the Assistant editor.或者在如下菜单中设置3. 关于显示 console OutPut就是有时输入pri原创 2014-12-08 11:57:49 · 469 阅读 · 0 评论 -
swift 学习资料地址
swift 资料中文文档http://numbbbbb.gitbooks.io/-the-swift-programming-language-/content/index.htmlhttps://selfstore.io/products/171http://swifter.tips原创 2014-12-05 15:51:00 · 505 阅读 · 0 评论 -
swift 访问权限
现在的访问权限则依次为:open,public,internal,fileprivate,private。原创 2017-11-07 13:39:27 · 254 阅读 · 0 评论 -
associatedtype关联类型
associatedtype关联类型定义一个协议时,有的时候声明一个或多个关联类型作为协议定义的一部分将会非常有用。关联类型为协议中的某个类型提供了一个占位名(或者说别名),其代表的实际类型在协议被采纳时才会被指定。你可以通过 associatedtype 关键字来指定关联类型。比如使用协议声明更新cell的方法://模型struct Model原创 2017-11-07 14:43:58 · 2505 阅读 · 0 评论 -
swift3.0 中class和static
class 和 static 相同点1.可以修饰方法,static 修饰的方法叫做静态方法,class修饰的叫做类方法2.都可以修饰计算属性class 和 static 不同点class 不能修饰存储属性class 修饰的计算属性可以被重写,static 修饰的不能被重写static 可以修饰存储属性,static修饰的存储属性称为静态变量(常量)static 修饰的静态方法不能被重写原创 2017-11-04 18:01:03 · 370 阅读 · 0 评论 -
Cannot explicitly specialize a generic function
swift3.1之后使用范型函数类似privatefunc getData(a: T) {}直接调用self.getData(a)会出现上述错误:不知道泛型的类型解决方案:让xcode推断出范型的类型Typically there are many ways to define generic functions. But the原创 2018-01-29 15:38:50 · 1959 阅读 · 0 评论 -
RxSwift学习记录
1.先看官方demo的playground然后看下边https://www.jianshu.com/p/a1e2665f9a6c2.subject代理https://www.cnblogs.com/scott-mr/p/7212509.html3.用RxSwift仿写知乎日报http://www.cocoachina.com/swift/20170222/18727.htm...原创 2018-09-28 17:07:44 · 198 阅读 · 0 评论 -
swift显示Any的真实类型
有时候我们在用swift的时候类型是Any不知道用什么类型解析。比如支付宝返回的结果字典。此时,用如下代码来查看真实的类型。 for (key, value) in resultDic ?? [AnyHashable: Any]() { print(key,type(of: value)) } for value ...原创 2019-04-10 10:53:46 · 3015 阅读 · 0 评论