【问题标题】:monotouch UITableView SectionIndexTitles brakes custom cell's backgroundmonotouch UITableView SectionIndexTitles 刹车自定义单元格的背景
【发布时间】:2013-02-02 13:19:50
【问题描述】:

我在使用 Monotouch SectionIndex 侧面板时遇到了非常奇怪的问题。基本上加完之后

公共覆盖字符串[] SectionIndexTitles (UITableView tableView)

对于我的表格数据源,我可以看到侧索引被正确填充,尽管它削减了我的自定义单元格的一些背景,这使它看起来有点奇怪(见下图)

我在 AppearanceManager 中设置了 UITableView.Appearance.BackgroundColor = UIColor.Clear,从外观上看,SectionIndex 继承了它,尽管我想要让 SectionIndex 保持“顶部”不影响它下面的任何东西,包括我的单元格的背景图像。

我是否遗漏了一些需要应用于 UITableView 的属性?

我花了很长时间试图找出丢失的东西,但没有得到任何结果......

谢谢!

截图 - http://blue-and-orange.net/media/30659/untitled.jpg

【问题讨论】:

    标签: uitableview xamarin.ios


    【解决方案1】:

    好的,我发现了问题!

    不应直接在单元格的 BackgroundColor 属性上分配背景,而是需要将自定义单元格中的 BackgroundView 分配给 - new UIVIew()(已设置背景)

    UIView backgroundView = new UIView(); backgroundView.BackgroundColor = UIColor.FromPatternImage(Resources.CinemaListingCellBackground); 背景视图 = 背景视图;

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多