gpt4 book ai didi

iPhone, txtPassword.textColor = cell.detailTextLabel.textColor; NSInternalInconsistencyException,原因:Invalid parameter not satisfying: color?

转载 作者:行者123 更新时间:2023-12-03 21:09:57 27 4
gpt4 key购买 nike

我只是想将我的文本文本字段设置为与详细文本标签颜色相同的颜色,这似乎是正确的方法,在这里看到了一些提供此答案的内容,但我收到了错误,有什么想法吗?

txtPassword.textColor = cell.detailTextLabel.textColor;

Assertion failure in -[UITextFieldLabel setTextColor:], /SourceCache/UIKit_Sim/UIKit-1262.60.3/UILabel.m:312
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: color'

最佳答案

这里的问题是cell.detailTextLabel.textColor的detailTextLabel没有为UITableViewCellStyleDefault定义。

您可以通过尝试直接设置颜色来确认问题是否出在 cell.detailTextLabel.textColor 或其他方面,即 txtPassword.textColor = [UIColor blueColor];

关于iPhone, txtPassword.textColor = cell.detailTextLabel.textColor; NSInternalInconsistencyException,原因:Invalid parameter not satisfying: color?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3941825/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com