4
我正在開發一個使用當前版本的Xamarin.iOS和C#的iPad應用程序,並且試圖創建一個UITableView
,它只有兩個角落(右上角和右下角)四捨五入。我知道如何通過設置myTable.Layer.CornerRadius = 6f;
來使所有角落四捨五入,但不知道如何只圍繞其中兩個角落。我環顧四周,但只能看到Objective-C的答案。這是我目前所擁有的:你怎麼能只圍繞Xamarin.iOS UITableView的兩個角落?
private UIView GetModalRowHeaderView2(RectangleF bounds)
{
UIView view = new UIView(bounds);
view.BackgroundColor = UIColor.Gray;
string[] tableItems = new string[] {"Item One","Item Two","Item Three"};
UITableView myTable = new UITableView(new RectangleF(0, 20, bounds.Width, bounds.Height - 40), UITableViewStyle.Plain);
myTable.SeparatorInset = UIEdgeInsets.Zero;
myTable.ScrollEnabled = false;
myTable.Source = new TableSource(tableItems);
// Rounds all corners
myTable.Layer.CornerRadius = 6f;
view.Add(myTable);
return view;
}
任何想法如何改變這隻能圍繞兩個角?
謝謝,
感謝@Krumelur ...我會去看看 –