コード例 #1
0
 /// <exception cref="ArgumentException">The requested page has not been configured.</exception>
 /// <exception cref="InvalidCastException">Requested controller is not of type <see cref="BaseViewController" />.</exception>
 /// <exception cref="InvalidOperationException">This instance has not been initialized.</exception>
 public void NavigateTo(TabBarItemType tabBarItemType)
 {
     if (!_tabBarPages.ContainsKey(tabBarItemType))
     {
         throw new ArgumentException("The requested page has not been configured.", nameof(tabBarItemType));
     }
     NavigateTo(_tabBarPages[tabBarItemType], null, false, true);
 }
コード例 #2
0
 public void Configure(TabBarItemType tabBarItemType, Type viewControllerType, string key = null,
                       bool isRoot = false)
 {
     lock (_pagesByKey)
     {
         var pageKey = key ?? tabBarItemType.ToString();
         if (_tabBarPages.ContainsKey(tabBarItemType))
         {
             _tabBarPages[tabBarItemType] = pageKey;
         }
         else
         {
             _tabBarPages.Add(tabBarItemType, pageKey);
         }
         Configure(pageKey, viewControllerType, isRoot);
     }
 }