adjustment

This commit is contained in:
2021-08-12 17:29:57 +08:00
parent fa0b033f2a
commit 04ef63ccc3
11 changed files with 116 additions and 26 deletions

View File

@ -151,20 +151,26 @@ namespace Gallery.iOS.Renderers.AppShellSection
public void UpdateLayout(UITabBarController controller)
{
var tabBar = controller.TabBar;
if (tabBar != null && tabBar.Items != null && tabBar.Items.Length >= 4)
if (tabBar != null && tabBar.Items != null && tabBar.Items.Length > 0)
{
var tabBarItem = tabBar.Items[0];
tabBarItem.Image = UIImage.FromBundle("IconBookmarkRegular");
tabBarItem.SelectedImage = UIImage.FromBundle("IconBookmark");
tabBarItem = tabBar.Items[1];
tabBarItem.Image = UIImage.FromBundle("IconYandereRegular");
tabBarItem.SelectedImage = UIImage.FromBundle("IconYandere");
tabBarItem = tabBar.Items[2];
tabBarItem.Image = UIImage.FromBundle("IconSourceRegular");
tabBarItem.SelectedImage = UIImage.FromBundle("IconSource");
tabBarItem = tabBar.Items[3];
tabBarItem.Image = UIImage.FromBundle("IconSourceRegular");
tabBarItem.SelectedImage = UIImage.FromBundle("IconSource");
if (tabBar.Items.Length > 1)
{
tabBarItem = tabBar.Items[1];
tabBarItem.Image = UIImage.FromBundle("IconYandereRegular");
tabBarItem.SelectedImage = UIImage.FromBundle("IconYandere");
}
if (tabBar.Items.Length > 2)
{
for (var i = 2; i < tabBar.Items.Length; i++)
{
tabBarItem = tabBar.Items[i];
tabBarItem.Image = UIImage.FromBundle("IconSourceRegular");
tabBarItem.SelectedImage = UIImage.FromBundle("IconSource");
}
}
}
}
}