summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.iOS/Renderers/PhoneMasterDetailRenderer.cs
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@users.noreply.github.com>2016-05-04 14:22:34 (GMT)
committerRui Marinho <me@ruimarinho.net>2016-05-04 14:22:34 (GMT)
commita8acdcc11793c9f44098f2cd478d51677d742945 (patch)
tree811cf1ee2e2ff0baa8674f116b6b5c08590f56cf /Xamarin.Forms.Platform.iOS/Renderers/PhoneMasterDetailRenderer.cs
parent8d383746caab00dd3ee0b62dc992a2a99c7a6d06 (diff)
downloadxamarin-forms-a8acdcc11793c9f44098f2cd478d51677d742945.zip
xamarin-forms-a8acdcc11793c9f44098f2cd478d51677d742945.tar.gz
xamarin-forms-a8acdcc11793c9f44098f2cd478d51677d742945.tar.bz2
Add IMasterDetailPageController and update renderers (#146)
Diffstat (limited to 'Xamarin.Forms.Platform.iOS/Renderers/PhoneMasterDetailRenderer.cs')
-rw-r--r--Xamarin.Forms.Platform.iOS/Renderers/PhoneMasterDetailRenderer.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Renderers/PhoneMasterDetailRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/PhoneMasterDetailRenderer.cs
index dcefbcf..e4c7352 100644
--- a/Xamarin.Forms.Platform.iOS/Renderers/PhoneMasterDetailRenderer.cs
+++ b/Xamarin.Forms.Platform.iOS/Renderers/PhoneMasterDetailRenderer.cs
@@ -43,6 +43,8 @@ namespace Xamarin.Forms.Platform.iOS
WantsFullScreenLayout = true;
}
+ IMasterDetailPageController MasterDetailPageController => Element as IMasterDetailPageController;
+
bool Presented
{
get { return _presented; }
@@ -153,7 +155,7 @@ namespace Xamarin.Forms.Platform.iOS
public override void WillRotate(UIInterfaceOrientation toInterfaceOrientation, double duration)
{
- if (!((MasterDetailPage)Element).ShouldShowSplitMode && _presented)
+ if (!MasterDetailPageController.ShouldShowSplitMode && _presented)
Presented = false;
base.WillRotate(toInterfaceOrientation, duration);
@@ -270,8 +272,8 @@ namespace Xamarin.Forms.Platform.iOS
else
_detailController.View.Frame = target;
- ((MasterDetailPage)Element).MasterBounds = new Rectangle(0, 0, masterFrame.Width, masterFrame.Height);
- ((MasterDetailPage)Element).DetailBounds = new Rectangle(0, 0, frame.Width, frame.Height);
+ MasterDetailPageController.MasterBounds = new Rectangle(0, 0, masterFrame.Width, masterFrame.Height);
+ MasterDetailPageController.DetailBounds = new Rectangle(0, 0, frame.Width, frame.Height);
if (Presented)
_clickOffView.Frame = _detailController.View.Frame;