summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.iOS/Renderers
diff options
context:
space:
mode:
authoradrianknight89 <adrianknight89@outlook.com>2017-06-22 11:36:28 -0700
committerRui Marinho <me@ruimarinho.net>2017-06-22 19:36:28 +0100
commit6e7b2ee3c05cbd1ef8eae8028e4236c988c6a6c5 (patch)
treed6bbfa32e652916b90a8e1081fe5c32aa4168ed8 /Xamarin.Forms.Platform.iOS/Renderers
parentf80a5e05de0d1a6d8f1c1d81bced85cb468e7813 (diff)
downloadxamarin-forms-6e7b2ee3c05cbd1ef8eae8028e4236c988c6a6c5.tar.gz
xamarin-forms-6e7b2ee3c05cbd1ef8eae8028e4236c988c6a6c5.tar.bz2
xamarin-forms-6e7b2ee3c05cbd1ef8eae8028e4236c988c6a6c5.zip
[iOS] Issue warning to console when MasterDetailPage is pushed onto NavigationPage (#1000)
* add warning * change to Trace
Diffstat (limited to 'Xamarin.Forms.Platform.iOS/Renderers')
-rw-r--r--Xamarin.Forms.Platform.iOS/Renderers/NavigationRenderer.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Renderers/NavigationRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/NavigationRenderer.cs
index 7b47b2bb..67078440 100644
--- a/Xamarin.Forms.Platform.iOS/Renderers/NavigationRenderer.cs
+++ b/Xamarin.Forms.Platform.iOS/Renderers/NavigationRenderer.cs
@@ -319,6 +319,10 @@ namespace Xamarin.Forms.Platform.iOS
protected virtual async Task<bool> OnPushAsync(Page page, bool animated)
{
+ if(page is MasterDetailPage)
+ System.Diagnostics.Trace.WriteLine($"Pushing a {nameof(MasterDetailPage)} onto a {nameof(NavigationPage)} is not a supported UI pattern on iOS. " +
+ "Please see https://developer.apple.com/documentation/uikit/uisplitviewcontroller for more details.");
+
var pack = CreateViewControllerForPage(page);
var task = GetAppearedOrDisappearedTask(page);