gpt4 book ai didi

ios - 如何在InAppSettingsKit中自定义颜色?

转载 作者:行者123 更新时间:2023-12-03 17:22:01 25 4
gpt4 key购买 nike

也许我遗漏了一些明显的东西,但似乎更改单元格颜色的唯一方法是更改​​ IASKAppSettingsViewController 和/或 IASKPSTextFieldSpecifierViewCell 中的代码。即使这似乎并不适用于所有情况。

我正在使用 PSTextFieldSpecifier、PSToggleSwitchSpecifier 和 PSTitleValueSpecifier。

对于 PSTextFieldSpecifier,位于

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier

我添加了这两行:

_textField.textColor = [UIColor whiteColor];
_textField.backgroundColor = [UIColor blackColor];

但是,这只改变了值的颜色,而不改变标题的颜色。如何更改标题的颜色?

最佳答案

最后,我使用 UIAppearance 设置单元格的背景,然后添加以下内容:

    cell.textLabel.textColor = [UIColor colorWithRed:0.0f green:122.0/255.0f blue:1.0f alpha:1.000f];
cell.detailTextLabel.textColor = [UIColor colorWithRed:0.0f green:122.0/255.0f blue:1.0f alpha:1.000f];

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

IASKAppSettingsViewController。

关于ios - 如何在InAppSettingsKit中自定义颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21517283/

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