工作中开发ios端时遇到的坑
1、ios时间格式不合法。xxxx-xx-xx xx:xx:xx
原因:年月日用-拼接,ios端就会识别不了
解决方法:
new Date("xxxx-xx-xx xx:xx:xx"..replace('-','/').replace('-','/'))
2.给页面最底部元素加margin-bottom无效
解决方法:给一个空白div就行。
3.混合app ios端不能使用js控制input的focus
解决办法:在 UIWebView 中配置 keyboardDisplayRequiresUserAction 为 NO 可以解决问题,并使得可以自动获取焦点(让原生端同事改一下)