1

I have the same issue described in this question except that I am working in Monotouch, not Objective-C. I am also using Monotouch-Dialog rather than Interface Builder.

So, to summarize that question, on a iPad the background of a grouped UITableView is always grey whereas on an iPhone it shows the standard striped background. I am wanting to get the same striped background showing when the application runs on an iPad.

I have tried the following in the ViewDidLoad override method (based on the answer posted in the question that I linked), but it does not work:

public class SyncDialog : DialogViewController
{
    public override void ViewDidLoad ()
    {
        this.TableView.BackgroundView = new UIView();
        base.ViewDidLoad ();
    }
}

Does anyone know how to get the background of the a Monotouch.Dialog DialogViewController on the iPad consistent with that shown on iPhone?

UPDATE:

I also tried changing the BackgroundColor of the tableview to UIColor.Clear as another answer tot the same question indicated. So I added:

this.TableView.BackgroundColor = UIColor.Clear;

But this also did not help. I also tried setting this.TableView.BackgroundView to null rather than instantiating another UIView object. But with both of these changes I just got a black background.

Community
  • 1
  • 1
BruceHill
  • 6,954
  • 8
  • 62
  • 114

1 Answers1

0

The sample that you referenced also indicates that you need to set the TableView.BackgroundColor to UIColor.Clear

miguel.de.icaza
  • 32,654
  • 6
  • 58
  • 76
  • Hi Miguel. Thanks for the response. I actually did see the other answer to the question that I posted and tried setting the _BackgroundColor_ to _UIColor.Clear_. But that did not help. All I got was a black background then. – BruceHill Jun 02 '12 at 14:55