summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.iOS
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@users.noreply.github.com>2016-09-27 07:50:02 -0600
committerRui Marinho <me@ruimarinho.net>2016-09-27 14:50:02 +0100
commit53e1d99a751e7a9cb8ae3f67ac8f3630b2aea398 (patch)
tree7379dd4d3419a69018e4db910936a8cf146f33f5 /Xamarin.Forms.Platform.iOS
parentc83c830c68bc0da08f330457dc6901f1657b86f5 (diff)
downloadxamarin-forms-53e1d99a751e7a9cb8ae3f67ac8f3630b2aea398.tar.gz
xamarin-forms-53e1d99a751e7a9cb8ae3f67ac8f3630b2aea398.tar.bz2
xamarin-forms-53e1d99a751e7a9cb8ae3f67ac8f3630b2aea398.zip
Fix potential NRE accessing current application via Page.RealParent (#330)
* Fix potential NRE accessing current application via Page.RealParent * Update Native Bindings Gallery to use MessagingCenter
Diffstat (limited to 'Xamarin.Forms.Platform.iOS')
-rw-r--r--Xamarin.Forms.Platform.iOS/Platform.cs14
1 files changed, 2 insertions, 12 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Platform.cs b/Xamarin.Forms.Platform.iOS/Platform.cs
index 9ec4a8a8..04874db8 100644
--- a/Xamarin.Forms.Platform.iOS/Platform.cs
+++ b/Xamarin.Forms.Platform.iOS/Platform.cs
@@ -149,16 +149,6 @@ namespace Xamarin.Forms.Platform.iOS
Page Page { get; set; }
- Application TargetApplication
- {
- get
- {
- if (Page == null)
- return null;
- return Page.RealParent as Application;
- }
- }
-
void IDisposable.Dispose()
{
if (_disposed)
@@ -304,7 +294,7 @@ namespace Xamarin.Forms.Platform.iOS
internal void DidAppear()
{
_animateModals = false;
- TargetApplication.NavigationProxy.Inner = this;
+ Application.Current.NavigationProxy.Inner = this;
_animateModals = true;
}
@@ -388,7 +378,7 @@ namespace Xamarin.Forms.Platform.iOS
Page.DescendantRemoved += HandleChildRemoved;
- TargetApplication.NavigationProxy.Inner = this;
+ Application.Current.NavigationProxy.Inner = this;
}
internal void WillAppear()