今日调试的bug

本文记录了在iOS开发中遇到的两个主要问题:1. 真机调试时出现'LYJ'的iPhone拒绝启动请求,通过编辑Scheme的Debug executable选项解决了此问题。2. 更新XCode后程序崩溃,原因是iOS13后对UITextField的_private_placeholderLabel属性访问被禁止,解决方案是使用AttributedString替换设置placeholder的方式。
摘要由CSDN通过智能技术生成

1.真机调试报错
问题
Details
Could not launch “XXX”
Domain: IDEDebugSessionErrorDomain
Code: 3
Failure Reason: “LYJ”的 iPhone has denied the launch request.
Internal launch error: process launch failed: failed to get the task for process 9043
process launch failed: failed to get the task for process 9043
Domain: IDEDebugSessionErrorDomain
Code: 3
解决:Edit Scheme -> Run -> Debug excitable去掉

2.更新XCode后跑程序崩了
问题
Terminating app due to uncaught exception ‘NSGenericException’, reason: ‘Access to UITextField’s _placeholderLabel ivar is prohibited. This is an application bug’
原因:iOS13适配问题,UITextField 的私有属性 _placeholderLabel 被禁止访问了
解决
登录界面的 设置placeholder属性的setValueforKeyPath全改成AttributedString设置

 [self.userField setValue:Color(173, 173, 173) forKeyPat
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值