搜索记录1

搜索记录:
1, swift 扩展中添加成员变量 -- runtime

2, swift 比较字符串 ==

3, swift tableview registerclass
self.tableView.registerClass(CustomWriteCell.classForCoder(), forCellReuseIdentifier: CustomWriteCell.cellID())

4, swift 代理变量
直接遵循协议即可 : var delegate : DropDownProtocol?

5, tableviewcell 左滑

6, swift 懒加载
lazy var tableView : UITableView = {
let tView = UITableView.init(frame:frame);
return tView
}()
7, ios scrollview 滚动到底部

8, swift 键盘升起通知

UIResponder.keyboardWillShowNotification

9, swift 单例

10, ios filehandle -- 针对单个文件的读写操作工具


11, swift Date

12, swift try cach

13, sandbox 沙盒路径 let home = NSHomeDirectory() as NSString;

14, swift map函数 ----------- 可实现数组遍历

一维数组
let numbers = [1,2,3,4]
let result = numbers.map { $0 + 2 } // $0表示闭包中的第一个参数,这里只有一个参数,即当前遍历到的元数。
print(result) // [3,4,5,6]

二维数组
let numbers2 = [[1,2,3],[4,5,6]];
var result = numbers2.map { $0.map{ $0 + 2 } }
print(result)// [[3, 4, 5], [6, 7, 8]]
//这个调用实际上是遍历了这里两个数组元素 [1,2,3] 和 [4,5,6]。 因为这两个元素依然是数组,所以我们可以对他们再次调用 map 函数。

15, ios nav 禁用左滑返回
self.navigationcontroller.interactivePopGestureRecognizer.isEnabled = false


16, ios 复制到剪贴板

let pasteBoard = UIPasteboard.general
pasteBoard.string = resuleTV.text

17, swift5 APP进入前后台通知

UIApplication.didEnterBackgroundNotification
UIApplication.willEnterForegroundNotification

// NSNotification.Name.UIApplication.willEnterForegroundNotification
// NSNotification.Name.UIApplication.didEnterBackgroundNotification

 

18, KVO实现原理

KVO是基于runtime机制实现的,KVO运用了isa-swizzling技术,isa-swizzling就是类型混合指针机制, 将2个对象的isa指针互相调换, 就是俗称的黑魔法.

19, 沙盒路径和沙盒

20, safe area 和 适配

21, 导航控制的向下偏移 64

22, iOS 写数据到 文件
data write
FileHandle
outputStream

23, data 转 [UInt8]
let data = "航歌".data(using: .utf8)!
let bytes = [UInt8](data)
print(bytes)

24, model descripition


25, OperationQueue 中 执行 operation

26, BLE MTU 问题

27, 集成 Chart

28, stride函数 map函数

29, iOS应用开发,在系统分享列表中加入自己的应用

UIActivityController

30, leftBarButtonItem rightBarButtonItem 的设置优先级 > backBarButtonItem

backBarButtonItem 的属性需要在 Avc push出 Bvc之前设置 Avc

 

posted @ 2020-06-17 14:51  wangwei_Carry  阅读(182)  评论(0编辑  收藏  举报