Skip to content

Commit

Permalink
Check if override presentation attribute actually returns a value
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanbeusekom committed May 30, 2017
1 parent d2c0856 commit 2f9e627
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions MvvmCross/iOS/iOS/Views/Presenters/MvxIosViewPresenter.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using MvvmCross.Core.ViewModels;
Expand Down Expand Up @@ -385,7 +385,10 @@ protected MvxBasePresentationAttribute GetPresentationAttributes(UIViewControlle
{
if (viewController is IMvxOverridePresentationAttribute vc)
{
return vc.OverridePresentationAttribute();
var presentationAttribute = vc.OverridePresentationAttribute();

if (presentationAttribute != null)
return presentationAttribute;
}

var attribute = viewController.GetType().GetCustomAttributes(typeof(MvxBasePresentationAttribute), true).FirstOrDefault() as MvxBasePresentationAttribute;
Expand Down

0 comments on commit 2f9e627

Please sign in to comment.