【问题标题】:Is it possible to set a custom background image to grouped tableView?是否可以为分组的 tableView 设置自定义背景图像?
【发布时间】:2012-09-26 16:39:23
【问题描述】:

我想为我的分组表格视图设置自定义背景(图像)。 在 xib 文件中,我在表格下添加了 imageView,将表格设置回 clearColor,它看起来很正常(在 Xib 中!)但是当我启动应用程序时,我看到标准背景

在 Xib 文件中:

在应用中:

【问题讨论】:

    标签: iphone objective-c uitableview


    【解决方案1】:
    // instead of adding a UIImageView to the background
    self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"image_name"]];
    self.tableView.backgroundColor = [UIColor clearColor];
    

    【讨论】:

    • 是的,谢谢,它有效。奇怪的是我的代码不适用于分组表。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-04
    • 2013-08-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多