1

我想覆盖默认情况下为 MonoTouch.Dialog 的表格提供的表格宽度。

4

1 回答 1

1

You can't do this, because it uses UITableView/UITableViewController which have some special features to take up the width of the parent view. What you can do is make a UIView to act as a "container" that is sized to the height and width you want, then add the TableView as a subview to that. Now the DialogViewController's TableView will size to your container.

Note* Container is then added as a subview to your controllers View.

container = new UIView(frameSize);
dvc = new DialogViewController(...);
container.AddSubview(dvc.TableView);
View.AddSubview(container);
于 2013-08-16T22:14:38.687 回答