我具有在SwiftUI中构建的iOS应用的标头,使用另一个视图作为NavigationBarItems中的主导视图
private void OpenxmlToolStripMenuItem_Click_1(object sender, EventArgs e)
{
String name = "Items";
String constr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" +
"C:\\Sample.xlsx" +
";Extended Properties='Excel 12.0 XML;HDR=YES;';";
OleDbConnection con = new OleDbConnection(constr);
OleDbCommand oconn = new OleDbCommand("Select * From [" + name + "$]", con);
con.Open();
OleDbDataAdapter sda = new OleDbDataAdapter(oconn);
DataTable data = new DataTable();
sda.Fill(data);
DtgTable.DataSource = data;
}
看起来像这样
很好,但是从任何NavigationLink视图目的地导航回去之后,该应用程序的徽标都会被剪切,如下所示。
这是所有代码
.navigationBarItems(leading: NewsTitleHeader().frame(width: geometry.size.width, height: 60, alignment: .center))
}