_BSMachError: (os/kern) invalid capability (20) _BSMachError: (os/kern) invalid name (15) 问题的解决
在项目中突然遇到一个问题,也就是_BSMachError: (os/kern) invalid capability (20) _BSMachError: (os/kern) invalid name (15)
虽然该问题对界面展示以及数据保存都没有影响,但是处于本人对于提示错误的洁癖,对于该问题进行了调研.
错误出现的情景:
- (void)showAlterView {
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"提示" message:@"是否确定放弃本次编辑" preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *_Nonnull action) {
}];
UIAlertAction *otherAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
[self.navigationController popViewControllerAnimated:YES];
}];
[alertController addAction:cancelAction];
[alertController addAction:otherAction];
[self presentViewController:alertController animated:YES completion:nil];
}
点击确定后返回上一个控制器时会出现这个错误
解决办法:
- (void)showAlterView {
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"提示" message:@"是否确定放弃本次编辑" preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *_Nonnull action) {
}];
UIAlertAction *otherAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
dispatch_async(dispatch_get_main_queue(), ^{
self.introduceTextView.delegate = nil;
[[NSNotificationCenter defaultCenter] removeObserver:self.introduceTextView];
[self.navigationController popViewControllerAnimated:YES];
});
}];
[alertController addAction:cancelAction];
[alertController addAction:otherAction];
[self presentViewController:alertController animated:YES completion:nil];
}
即将alterAction事件放到主线程中去执行.
ps:本人由于精力和时间有限,并没有对该问题进行深入研究,希望同行大神有什么理解还有深入研究,可以告知小女,小女在此谢过各位大牛.
_BSMachError: (os/kern) invalid capability (20) _BSMachError: (os/kern) invalid name (15) 问题的解决的更多相关文章
- iOS _BSMachError: (os/kern) invalid capability (20)
_BSMachError: (os/kern) invalid capability (20) 解决办法:将info.plist里面的en改为United States 2016-04-18 22:4 ...
- Python os.path.dirname(__file__) 与 Python os.path.abspath(__file__) 与 os.system() 函数
Python os.path.dirname(__file__) 与 Python os.path.abspath(__file__) 的区别 os.path.abspath(__file__)返回 ...
- os引导程序boot从扇区拷贝os加载程序loader文件到内存(boot copy kernel to mem in the same method)
[0]README 0.1) 本代码旨在演示 在boot 代码中,如何 通过 loader文件所在根目录条目 找出该文件的 在 软盘所有全局扇区号(簇号),并执行内存中的 loader 代码: 0.2 ...
- python获取某路径下,某种特定类型的文件名称,os.walk(路径)生成器;os.listdir(路径),os.path.splitext(名称),os.path.join(路径,名称),os.path.isdir(路径\名称)
#获取某文件夹下制定类型文件# import os# def filep(fp):# l=[]# a=os.walk(fp) #生成器# for nowp,sonp,oth in a: #当前目录,子 ...
- nuxt/eapress 安装报错Module build failed: ValidationError: PostCSS Loader Invalid OptionsModule build failed: ValidationError: PostCSS Loader Invalid Options options['useConfigFile'] is an invalid additi
错误信息: Module build failed: ValidationError: PostCSS Loader Invalid Options options['useConfigFile'] ...
- x01.os.12: 在 windows 中写 OS
在 windows 中写操作系统,需要一系列的辅助工具.在此,要感谢川谷秀实!所有工具,都在 z_tools 文件夹中.有了大师的帮助,不妨也来尝试在 windows 中写一把 OS. 源代码及工具可 ...
- 关于在Mac OS下安装npm与cnpm的ERR! Darwin 15.0.0解决办法
mac os安装好了很久了,不过没怎么用,昨天想要体验一下大神们推荐的黑苹果系统用起来怎么样(关于安装黑苹果的可以到我的简书去看相关文章),于是乎,打开久违的vmware,看着咬一口的苹果进度图,心中 ...
- Windows下虚拟机安装Mac OS X —– VMware Workstation12安装Mac OS X 10.11
1下载 镜像:Instal OS X Yosemite 10.10.3(14D131).cdr 密码:qhhm 2 unlocker208文件(链接:https://pan.baidu ...
- Mac OS安装octave出现的问题-'error:terminal type set to 'unknown'的解决'
学习Machine learning需要使用Octave语言,毕竟Andrew Ng (恩达.吴)力荐.本机系统Mac OS X EI Capitan, 其实什么系统都无所谓了,安装原理都是一样的. ...
随机推荐
- 羽夏看Win系统内核——保护模式篇
写在前面 此系列是本人一个字一个字码出来的,包括示例和实验截图.由于系统内核的复杂性,故可能有错误或者不全面的地方,如有错误,欢迎批评指正,本教程将会长期更新. 如有好的建议,欢迎反馈.码字不易, ...
- split,cdn,shell脚本,tmux,记一次往国外服务器传大文件的经历
需求是这样的:将一个大概680M的Matlab数据文件传到国外某所大学的服务器上,服务器需要连接VPN才能访问,由于数据文件太大,而且如果我直接ssh连过去或者用ftp传输,那么中间很可能中断. ps ...
- Linux&c 文件操作,线程进程控制,网络编程,简单知识点梳理
一:文件操作 在linux下,一切皆文件,目录是文件,称为目录文件,内容是该目录的目录项(但是目录只有内核可以编辑,超级用户也不可以编辑),设备也是设备文件,在/dev存放的就是一些设备文件,linu ...
- 使用BadBoy录制JMeter脚本
BadBoy简介 BadBoy是一款免费WEB自动化测试工具,其实就是一个浏览器模拟工具,具有录制和回放功能,支持对录制出来的脚本进行调试.同时支持捕获表单数据的功能,所以能够进行自动化测试.但目前 ...
- 『学了就忘』Linux基础命令 — 34、配置网络相关命令
目录 1.配置网络常用命令 2.ifconfig命令 3.ping命令 4.netstat 命令 使用1:查看本机开启的端口 使用2:查看本机有哪些程序开启的端口 使用3:查看所有连接 使用4:查看网 ...
- Mysql - 如何存储 10位、13位的 unix 时间戳?
背景 前面有讲过存日期时间可以用 datetime.timestamp 类型:https://www.cnblogs.com/poloyy/p/15546735.html 格式是: YYYY-MM- ...
- JDBC操作多张表一
一.操作一对多情况开发步骤1创建对象 //代码部门的对象public class Department { private String id; private String name; privat ...
- 搜索系统核心技术概述【1.5w字长文】
前排提示:本文为综述性文章,梳理搜索相关技术,如寻求前沿应用可简读或略过 搜索引擎介绍 搜索引擎(Search Engine),狭义来讲是基于软件技术开发的互联网数据查询系统,用户通过搜索引擎查询所需 ...
- [nowcoder5667H]Happy Triangle
可以发现合法的答案有两种可能: 1.询问的$x$即为最大值(或之一),那么只需要找到x前两个数并判断即可 2.询问的$x$不是最大值,那么就要保证另外两边之差小于$x$,维护后缀中$的前驱k-k的前驱 ...
- [loj2478]林克卡特树
原题等价于选择恰好$k+1$条不相交(无公共点)的路径使得边权和最大 证明:对于原题中的最优解,一定包含了k条0边权的边(否则可以将未使用的边删掉,然后将这条路径的末尾与不在同一个连通块内的点连边), ...