分段的tableview索引选择突出显示 [英] sectioned tableview index selection highlighting

查看:53
本文介绍了分段的tableview索引选择突出显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为这应该是一个简单的属性,但是我一生都在搜寻并且找不到答案.

I feel this should be a simple property, but for the life of me I've searched and cannot find the answer.

我在表的右侧有一个tableview索引.选中后,它会将所有内容显示为灰色.我想模仿iPod应用程序,在选择索引本身时,它是半透明的(可能是.4F的Alpha).

I have a tableview index to the right of my table. When selected, it grays out everything. I'd like to mimic the iPod app, whereby when the index itself is selected, it is semi-transparent (alpha of maybe .4f).

有什么想法吗?

推荐答案

根据我的发现,这也许可以做到(但可能会使您的应用被拒绝):

From what I found this might be able to do it (but might get your app rejected):

- (UITableViewCell *)tableView:(UITableView *)tv 
         cellForRowAtIndexPath:(NSIndexPath *)indexPath 
{    
    for(UIView *view in [tv subviews])
    {
        if([[[view class] description] isEqualToString:@"UITableViewIndex"])
        {
            [view setAlpha:0.4];
        }
    }
    //rest of cellForRow handling...
}

这篇关于分段的tableview索引选择突出显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆