![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
iOS
锤子哥
欧耶
展开
-
Swift-录制视频遇到的异常崩溃
录制视频遇到的异常崩溃*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[AVCaptureMovieFileOutput startRecordingToOutputFileURL:recordingDelegate:] Cannot record to URL /private/var/mobile/Containers/Data/Application/1CD7C276-原创 2020-08-26 20:27:25 · 397 阅读 · 0 评论 -
iOS-Main Thread Checker(主线程问题)
Main Thread Checker: UI API called on a background thread: -[UIView bounds]PID: 489, TID: 88977, Thread name: (none), Queue name: image decode, QoS: 0Backtrace:在iOS客户端如果在非主线程直接操作了ui的任何数据都会报这个警告⚠️,一般会导致界面卡顿等现象。举个栗子:错误的做法:self.serialQueue.async {原创 2020-07-30 12:07:50 · 1327 阅读 · 0 评论 -
swift 两种取出两个数组包含的相同元素的方法
先分别创建两个有相同元素的数组。 var arr1: [String] = [] var arr2: [String] = [] for i in 0...1000 { arr1.append("\(i)") } for i in 900...2000 { arr2.append("\(i)") }方法一:使用较常见的两个fo...原创 2019-12-20 10:45:28 · 3220 阅读 · 0 评论 -
iOS 设置允许HTTP请求
Error Domain=NSURLErrorDomain Code=-1022 “The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.” UserInfo={NSLocalizedDescription=The reso...原创 2019-12-13 16:01:51 · 2463 阅读 · 0 评论