摘要: 一:下载编译脚本 地址:https://github.com/kewlbear/FFmpeg-iOS-build-script 二:下载并安装gas-preprocessor 地址:https://github.com/FFmpeg/gas-preprocessor 将文件 gas-preproce 阅读全文
posted @ 2022-02-08 18:59 EverNight 阅读(874) 评论(0) 推荐(0) 编辑
摘要: NSTimer基于runloop,如果runloop的任务过于繁重,可能会导致NSTimer不准时。 使用GCD创建的定时器基于系统内核,不依赖runloop,相较于NSTimer更加准时。 @interface ViewController () @property (nonatomic,stro 阅读全文
posted @ 2021-06-15 16:12 EverNight 阅读(288) 评论(0) 推荐(0) 编辑
摘要: NSTimer、CADisplayLink会对target产生强引用,如果target同时对他们产生强引用,则会发生循环引用。 以NSTimer为例,解决循环引用的问题。 方法1:使用block - (void)viewDidLoad { [super viewDidLoad]; // Do any 阅读全文
posted @ 2021-06-11 17:49 EverNight 阅读(138) 评论(0) 推荐(1) 编辑
摘要: 苹果对编译器在不断优化,GCD方法中的block基本都不需要使用weakself,并不会造成循环引用。 dispatch_after官方文档中对block部分的说明: 一:使用self 从ViewControllerA push 到 ViewControllerB。ViewControllerB中代 阅读全文
posted @ 2021-04-01 20:53 EverNight 阅读(977) 评论(0) 推荐(0) 编辑
摘要: 一、安装Xcode 二、安装Android Studio 三、安装brew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 四、下载Flutter S 阅读全文
posted @ 2021-01-11 14:55 EverNight 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 一、AFNetworking POST纯字符串 修改位置AFURLRequestSerialization 修改前 NSString * AFQueryStringFromParameters(NSDictionary *parameters) { NSMutableArray *mutablePa 阅读全文
posted @ 2019-06-25 15:15 EverNight 阅读(700) 评论(0) 推荐(0) 编辑
摘要: UncaughtExceptionHandler.h #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN @interface UncaughtExceptionHandler : NSObject @end void Uncaught 阅读全文
posted @ 2018-11-19 17:06 EverNight 阅读(572) 评论(0) 推荐(0) 编辑
摘要: 查看本地git配置信息 git config --global -e 查看自己梯子的代理地址和端口信息 为git添加代理 git config --global http.proxy https://127.0.0.1:51643 git config --global https.proxy ht 阅读全文
posted @ 2017-12-14 20:59 EverNight 阅读(465) 评论(0) 推荐(0) 编辑
摘要: - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. self.view.backgroundColor = [UICol 阅读全文
posted @ 2017-06-23 16:02 EverNight 阅读(395) 评论(0) 推荐(0) 编辑
摘要: - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. UIImageView *imageView = [[UIImage 阅读全文
posted @ 2017-06-22 21:02 EverNight 阅读(674) 评论(0) 推荐(0) 编辑
摘要: - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. // 滤镜效果 NSArray *operations = @[@" 阅读全文
posted @ 2017-06-20 18:04 EverNight 阅读(647) 评论(0) 推荐(0) 编辑
摘要: #import <AVFoundation/AVFoundation.h> // 初始化方法 AVSpeechSynthesizer *speech = [[AVSpeechSynthesizer alloc]init]; // 设置内容 AVSpeechUtterance *utterance = 阅读全文
posted @ 2017-06-19 17:24 EverNight 阅读(400) 评论(0) 推荐(0) 编辑
摘要: 创建动画 UIDynamicAnimator *animator = [[UIDynamicAnimator alloc] initWithReferenceView:self.view]; 协议代理 @protocol UIDynamicAnimatorDelegate <NSObject> @o 阅读全文
posted @ 2017-06-17 12:25 EverNight 阅读(989) 评论(0) 推荐(0) 编辑
摘要: 如同任何基于C的应用程序,程序启动的主入口点为iOS应用程序的main函数。在iOS应用程序,main函数的作用是很少的。它的主要工作是控制UIKit framework。因此,你在Xcode中创建任何新的项目都配备了一个默认的主函数。除了少数特例外,你永远不应该改变这个函数的实现。 #import 阅读全文
posted @ 2014-07-02 18:39 EverNight 阅读(1695) 评论(0) 推荐(0) 编辑
摘要: 对于iOS应用程序,关键的是要知道你的应用程序是否正在前台或后台运行。由于系统资源在iOS设备上较为有限,一个应用程序必须在后台与前台有不同的行为。操作系统也会限制你的应用程序在后台的运行,以提高电池寿命,并提高用户与前台应用程序的体验。当应用程序在前台和后台之间切换时,操作系统将会通知您的应用程序 阅读全文
posted @ 2014-07-01 16:11 EverNight 阅读(2099) 评论(0) 推荐(1) 编辑