使用cordova开发ios项目的时候,在上传图片碰到一个问题。使用html的<input type="file"/>标签来选择照片或者拍照片,引起了布局报错,然后图片上传过程中很容易崩溃闪退。

html页面代码:

<html><head></head>
<body>
<input type="file" />
</body>
</html>

然后在真机测试,点击选择文件,控制台出现布局报错日志:

Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
() look at each constraint and try to figure out which you don't expect;
() find the code that added the unwanted constraint or constraints and fix it.
(
"<NSLayoutConstraint:0x156734e0 UILabel:0x1568b9f0.width == UIView:0x155d9110.width - 32>",
"<NSLayoutConstraint:0x1568db80 UIView:0x155d9110.width == UIView:0x155d8fc0.width>",
"<NSLayoutConstraint:0x156913b0 H:[UIView:0x155d8fc0(30)]>"
) Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x156734e0 UILabel:0x1568b9f0.width == UIView:0x155d9110.width - > Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.

然后上传图片或者视频的时候,常会出现崩溃闪退现象。在cordova和phonegap搜了下,没搜到解决的办法,不知道哪位兄台又碰到这个问题么,指点我一下!

完整cordova for ios demo下载:http://download.csdn.net/detail/tandaxia/9455872

原文链接:http://www.cnblogs.com/tandaxia/p/5255394.html

最新文章

  1. 【Python全栈笔记】04 [模块二] 18 Oct lambda表达式, 内置函数
  2. linux runlevel
  3. linux关闭声音
  4. mongodb远程连接配置
  5. tmux frequently asked questions
  6. 湘潭大学1185 Bob&amp;#39;s Problem
  7. IIS  发布  dedecms  网站教程
  8. 微信小程序基础之开源项目库汇总
  9. RESTful杂记
  10. Perl检查引用类型
  11. Squid.conf配置详情
  12. 搭建oracle linux虚拟机报错解决
  13. BZOJ.3638.CF172 k-Maximum Subsequence Sum(模拟费用流 线段树)
  14. 黄聪:AngularJS 动态加载控制器实例-ocLoazLazy
  15. [疯狂Java]JDBC:PreparedStatement预编译执行SQL语句
  16. Linux下内存泄漏工具【转】
  17. HttpWebRequest.ReadWriteTimeout 属性
  18. nodejs 服务器实现区分多客户端请求服务
  19. 【Window OS】”对于目标文件系统,文件XXXXX过大“导致无法进行文件操作的解决方法
  20. 进程组&amp;Session

热门文章

  1. Restore Volume 操作 - 每天5分钟玩转 OpenStack(60)
  2. Easyui datagrid 显示隐藏列
  3. js操作label,给label赋值,和取label的值
  4. C语言 第四章 关系、逻辑运算与分支流程控制
  5. 附录E 安装Kafka
  6. Struts2学习笔记--使用Response下载文件和Struts2的StreamResult文件下载
  7. 通过 WebSocket 实现 WebGL 3D 拓扑图实时数据通讯同步(二)
  8. padding/border与width的关系
  9. c#静态构造函数 与 构造函数 你是否还记得?
  10. [Asp.net 5] DependencyInjection项目代码分析4-微软的实现(5)(IEnumerable&lt;&gt;补充)