Update NavigationService (iOS) to navigate to a storyboard even if Configure was not called.

This commit is contained in:
Laurent Bugnion 2016-02-12 19:09:13 +01:00
Родитель 9756cef936
Коммит baaee9b080
1 изменённых файлов: 11 добавлений и 8 удалений

Просмотреть файл

@ -246,17 +246,20 @@ namespace GalaSoft.MvvmLight.Views
{
Exception creationException = null;
var done = false;
TypeActionOrKey item;
if (!_pagesByKey.ContainsKey(pageKey))
if (_pagesByKey.ContainsKey(pageKey))
{
throw new ArgumentException(
string.Format(
"No such page: {0}. Did you forget to call NavigationService.Configure?",
pageKey),
"pageKey");
item = _pagesByKey[pageKey];
}
else
{
item = new TypeActionOrKey
{
StoryboardControllerKey = pageKey
};
}
var item = _pagesByKey[pageKey];
UIViewController controller = null;
if (item.CreateControllerAction != null)
@ -283,7 +286,7 @@ namespace GalaSoft.MvvmLight.Views
if (NavigationController.Storyboard == null)
{
throw new InvalidOperationException(
"Unable to navigate: No storyboard found");
"Unable to navigate: No storyboard found. You need to call NavigationService.Configure!");
}
try