gpt4 book ai didi

iphone - iOS UITableView索引是透明的

转载 作者:行者123 更新时间:2023-12-01 16:54:36 25 4
gpt4 key购买 nike

如下图所示,我已经设置了表格的背景和其他样式。以红色突出显示的索引是透明的。我如何将其设置为与单元格的其余部分一样的白色?

最佳答案

    its too much easy dude.

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


for(UIView *view in [tableView subviews])
{
if([[[view class] description] isEqualToString:@"UITableViewIndex"])
{
[view performSelector:@selector(setIndexColor:) withObject:[UIColor whiteColor]];

//give color which you want
}
}



static NSString *MyIdentifier = @"MyIdentifier";


//go further with table cell design...

}

关于iphone - iOS UITableView索引是透明的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12849114/

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