
swift
文章平均质量分 93
师从小白
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
object-c/c++
.m文件 oc文件,完全兼容C语言 .mm文件 oc++文件,兼容C++语言 #import "*.h" NSString NSInteger // 声明 @interface Student : NSObject { } - (id)init; + (void)test; @end // 实现 @implementation Student - (id)init { self = [super init] if(self) { ...原创 2020-07-23 12:44:38 · 540 阅读 · 0 评论 -
Swift学习1
基本语法 数据类型 基本数据类型 BoolCharacter IntUInt Float Double UInt8 UInt16 UInt32 UInt64 Int8 Int16 Int32 Int64 PS: 在32位平台上 ,Int与Int32长度相同;在64位平台上 ,Int与Int64长度相同(UInt也类似) 复合数据类型 数组、字典和元组 范围 枚举 结构体 类 ...原创 2019-05-28 15:47:56 · 231 阅读 · 1 评论 -
Swift学习2
变量 变量修辞关键词 strong(默认) weak(弱引用,计数不会+1),必须为可选类型变量,一是可选? !,二是变量var String格式 "\(h):\(m):\(s)" String(h)+String(m)+String(s) String(format:"%2d:%2d:%2d",arguments:[h:m:s]) 数组 可以不同类型,自动推导为NSObject ...原创 2019-05-28 15:48:02 · 399 阅读 · 0 评论 -
Swift学习3 线程
队列 串行队列 并行队列 // 主队列异步 DispatchQueue.main.async { print("main async \(Thread.current)") } // DispatchQueue.global().async { print("global() async \(Thread.current)") } // 串行队列同步 let serial...原创 2019-06-02 19:49:17 · 191 阅读 · 0 评论