Skip to content
Browse files

Fix for animation when a view is accessed for the first time

  • Loading branch information...
1 parent eb9fa9d commit 69cd6be6ed4788524c8151be6f20633b8add06c3 @lubiluk lubiluk committed Mar 22, 2013
Showing with 7 additions and 8 deletions.
  1. +1 −6 FlyoutNavigation/FlyoutNavigation.csproj
  2. +6 −2 FlyoutNavigation/FlyoutNavigationController.cs
View
7 FlyoutNavigation/FlyoutNavigation.csproj
@@ -36,16 +36,11 @@
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="monotouch" />
+ <Reference Include="MonoTouch.Dialog-1" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Compile Include="OpenMenuGestureRecognizer.cs" />
<Compile Include="FlyoutNavigationController.cs" />
</ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\MonoTouch.Dialog\MonoTouch.Dialog\MonoTouch.Dialog.csproj">
- <Project>{3FFBFFF8-5560-4EDE-82E5-3FFDFBBA8A50}</Project>
- <Name>MonoTouch.Dialog</Name>
- </ProjectReference>
- </ItemGroup>
</Project>
View
8 FlyoutNavigation/FlyoutNavigationController.cs
@@ -209,12 +209,16 @@ private void NavigationItemSelected (int index)
SelectedIndexChanged ();
return;
}
+
+ var isOpen = false;
- if (mainView != null)
+ if (mainView != null) {
mainView.RemoveFromSuperview ();
+ isOpen = IsOpen;
+ }
CurrentViewController = ViewControllers [SelectedIndex];
var frame = View.Bounds;
- if (IsOpen || ShouldStayOpen)
+ if (isOpen || ShouldStayOpen)
frame.X = menuWidth;
setViewSize ();

0 comments on commit 69cd6be

Please sign in to comment.
Something went wrong with that request. Please try again.