gpt4 book ai didi

ios - 具有 UITableViewCellSelectionStyleGray 选择颜色的 UIButton

转载 作者:可可西里 更新时间:2023-11-01 05:41:24 24 4
gpt4 key购买 nike

我正在尝试将 UIButton 的选定颜色设置为“UITableViewCellSelectionStyleGray”的颜色;问题是无法设置 UIButton 的选择颜色,只能设置图像。有谁知道如何使用 UITableViewCellSelectionStyleGray 制作与所选单元格颜色完全相同的图像?

最佳答案

不幸的是,我似乎无法以编程方式找到实际颜色,但 DigitalColor Meter (OSX APP) 显示颜色为 217 217 217

UIColor* selectedColor = [UIColor colorWithRed:217.0/255.0 
green:217.0/255.0
blue:217.0/255.0 alpha:1.0];

关于ios - 具有 UITableViewCellSelectionStyleGray 选择颜色的 UIButton,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18832184/

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