【发布时间】:2014-05-19 11:35:59
【问题描述】:
我使用以下代码为UIView 添加边框,并为UITableView 添加边框。
对于UIView:
RectangleF _frame = new RectangleF (0, 0, this.Frame.Width , 56);
DescriptionView = new UIView (_frame);
DescriptionView.BackgroundColor = UIColor.White ;
DescriptionView.Layer.BorderColor = new CGColor (0, 0, 0, 1.0f);
DescriptionView.Layer.BorderWidth = 0.5f;
对于UITable:
RectangleF _frame = new RectangleF (0, DescriptionView.Frame.Height + 10,
this.Frame.Width , this.Frame.Height - (DescriptionView.Frame.Height + 10));
InstructionTable = new UITableView (_frame);
InstructionTable.Layer.BorderColor = new CGColor (0, 0, 0, 1.0f);
InstructionTable.Layer.BorderWidth = 0.5f;
对于 iPhone 3.5 英寸和 iPhone 4 英寸,它可以正常工作,但对于 iPad,边框没有显示在视图的右侧以及表格的顶部和右侧。请参见下面的屏幕截图:
【问题讨论】:
-
以前有人见过这个问题吗?
标签: ios uitableview uiview ios7 xamarin.ios