From 5f827188a77751e8c3d6a0f654008ae41d7ce803 Mon Sep 17 00:00:00 2001 From: James Clancey Date: Thu, 11 Dec 2014 18:10:58 -0900 Subject: [PATCH 01/11] Added toggle switch to the sample --- FlyoutNavigation/FlyoutNavigation.csproj | 2 -- .../FlyoutNavigationSample/MainController.cs | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/FlyoutNavigation/FlyoutNavigation.csproj b/FlyoutNavigation/FlyoutNavigation.csproj index 903a41c..be7e035 100644 --- a/FlyoutNavigation/FlyoutNavigation.csproj +++ b/FlyoutNavigation/FlyoutNavigation.csproj @@ -3,8 +3,6 @@ Debug AnyCPU - 8.0.30703 - 2.0 {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A} {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} Library diff --git a/FlyoutNavigationSample/FlyoutNavigationSample/MainController.cs b/FlyoutNavigationSample/FlyoutNavigationSample/MainController.cs index 0c22130..d2fb466 100644 --- a/FlyoutNavigationSample/FlyoutNavigationSample/MainController.cs +++ b/FlyoutNavigationSample/FlyoutNavigationSample/MainController.cs @@ -49,6 +49,7 @@ public override void ViewDidLoad () }, new Section ("Extras") { + new BooleanElement("Toggle",true), new StringElement("Swipable Table"), new StringElement("Storyboard"), } @@ -57,6 +58,8 @@ public override void ViewDidLoad () // Create an array of UINavigationControllers that correspond to your // menu items: var viewControllers = Tasks.Select (x => new UINavigationController (new TaskPageController (navigation, x))).ToList (); + //Add null for the toggle switch + viewControllers.Add (null); viewControllers.Add (new UINavigationController(new SwipableTableView ())); //Load from Storyboard var storyboardVc = CreateViewController ("MyStoryBoard","MyStoryboardViewController"); From c38ebe66ee6172877366b2b020ffde1dd4946ed6 Mon Sep 17 00:00:00 2001 From: James Clancey Date: Fri, 12 Dec 2014 12:04:32 -0900 Subject: [PATCH 02/11] Cleaned up getting bounds. Should be right no matter what now --- .../FlyoutNavigationController.cs | 72 ++++++++----------- 1 file changed, 29 insertions(+), 43 deletions(-) diff --git a/FlyoutNavigation/FlyoutNavigationController.cs b/FlyoutNavigation/FlyoutNavigationController.cs index 2e605ab..561d193 100644 --- a/FlyoutNavigation/FlyoutNavigationController.cs +++ b/FlyoutNavigation/FlyoutNavigationController.cs @@ -246,7 +246,6 @@ class UAUIView : UIView [Export ("accessibilityIdentifier")] public string AccessibilityId {get;set;} } - bool swapHeightAndWidthInLandscape = true; void Initialize(UITableViewStyle navigationStyle = UITableViewStyle.Plain) { @@ -260,11 +259,6 @@ void Initialize(UITableViewStyle navigationStyle = UITableViewStyle.Plain) navFrame.X = mainView.Frame.Width - menuWidth; navigation.View.Frame = navFrame; View.AddSubview(navigation.View); - //SearchBar = new UISearchBar(new CGRect(0, 0, navigation.TableView.Bounds.Width, 44)) - // { - // //Delegate = new SearchDelegate (this), - // TintColor = TintColor - // }; TintColor = UIColor.Black; var version = new System.Version(UIDevice.CurrentDevice.SystemVersion); @@ -278,13 +272,6 @@ void Initialize(UITableViewStyle navigationStyle = UITableViewStyle.Plain) } navigation.TableView.TableFooterView = new UIView(new CGRect(0, 0, 100, 100)) {BackgroundColor = UIColor.Clear}; - // MDR 10/12/2014 - iOS 7 confuses height and width when rotated - // MDR 10/12/2014 - Not sure about previous versions - swapHeightAndWidthInLandscape = true; - - // MDR 10/12/2014 - iOS 8 fixes this - if (version.Major >= 8) - swapHeightAndWidthInLandscape = false; navigation.TableView.ScrollsToTop = false; shadowView = new UIView(){AccessibilityLabel = "flyOutShadowLayeLabel" , IsAccessibilityElement = true}; @@ -328,7 +315,7 @@ internal bool shouldReceiveTouch(UIGestureRecognizer gesture, UITouch touch) public override void ViewDidLayoutSubviews() { base.ViewDidLayoutSubviews(); - CGRect navFrame = View.Bounds; + CGRect navFrame = GetViewBounds(); // navFrame.Y += UIApplication.SharedApplication.StatusBarFrame.Height; // navFrame.Height -= navFrame.Y; //this.statusbar @@ -413,10 +400,19 @@ public override void ViewWillAppear(bool animated) View.BackgroundColor = NavigationTableView.BackgroundColor; var frame = mainView.Frame; setViewSize (); + frame.Size = mainView.Frame.Size; SetLocation (frame); navigation.OnSelection += NavigationItemSelected; base.ViewWillAppear(animated); } + public override void ViewDidAppear (bool animated) + { + base.ViewDidAppear (animated); + var frame = mainView.Frame; + setViewSize (); + frame.Size = mainView.Frame.Size; + SetLocation (frame); + } public override void ViewWillDisappear (bool animated) { base.ViewWillDisappear (animated); @@ -454,14 +450,14 @@ protected void NavigationItemSelected(int index) isOpen = IsOpen; } CurrentViewController = ViewControllers[SelectedIndex]; - CGRect frame = View.Bounds; + CGRect frame = GetViewBounds(); if (isOpen || ShouldStayOpen) frame.X = Position == FlyOutNavigationPosition.Left ? menuWidth : -menuWidth; - setViewSize(); - SetLocation(frame); View.AddSubview(mainView); AddChildViewController(CurrentViewController); + setViewSize(); + SetLocation(frame); if (!ShouldStayOpen) HideMenu(); if (SelectedIndexChanged != null) @@ -511,36 +507,26 @@ public void ShowMenu() void setViewSize() { - CGRect frame = View.Bounds; - //frame.Location = CGPoint.Empty; - if (ShouldStayOpen) - frame.Width -= menuWidth; - - // mribbons@github - 28/08/2014 - Fix issue where mainview doesn't have full width sometimes after menu is opened in landscape, or app is started in landscape - if (InterfaceOrientation == UIInterfaceOrientation.LandscapeLeft || InterfaceOrientation == UIInterfaceOrientation.LandscapeRight) - { - if (swapHeightAndWidthInLandscape) - { - frame.Width = UIScreen.MainScreen.Bounds.Height - (ShouldStayOpen ? menuWidth : 0); - frame.Height = UIScreen.MainScreen.Bounds.Width; - } - else - { - frame.Width = UIScreen.MainScreen.Bounds.Width - (ShouldStayOpen ? menuWidth : 0); - frame.Height = UIScreen.MainScreen.Bounds.Height; - } - } - else - { - frame.Width = UIScreen.MainScreen.Bounds.Width - (ShouldStayOpen ? menuWidth : 0); - frame.Height = UIScreen.MainScreen.Bounds.Height; - } + CGRect frame = GetViewBounds(); + frame.Width -= ShouldStayOpen ? menuWidth : 0; - mainView.Bounds = frame; + mainView.Frame = frame; DisplayMenuBorder(mainView.Frame); } + CGRect GetViewBounds() + { + CGRect frame = View.Bounds; + if ((InterfaceOrientation == UIInterfaceOrientation.LandscapeLeft || InterfaceOrientation == UIInterfaceOrientation.LandscapeRight)) { + var width = NMath.Max (frame.Width, frame.Height); + var height = NMath.Min (frame.Width, frame.Height); + frame.Width = width; + frame.Height = height; + } + return frame; + } + void SetLocation(CGRect frame) { mainView.Layer.AnchorPoint = new CGPoint(.5f, .5f); @@ -651,7 +637,7 @@ public void HideMenu() UIView.Animate(.2, () => { UIView.SetAnimationCurve(UIViewAnimationCurve.EaseInOut); - CGRect frame = View.Bounds; + CGRect frame = GetViewBounds(); frame.X = 0; setViewSize(); SetLocation(frame); From 400daacc0693ca20dae2f52eb33d6f9e6db1268e Mon Sep 17 00:00:00 2001 From: James Clancey Date: Fri, 12 Dec 2014 12:08:49 -0900 Subject: [PATCH 03/11] Fixed build for classic --- FlyoutNavigation/FlyoutNavigationController.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/FlyoutNavigation/FlyoutNavigationController.cs b/FlyoutNavigation/FlyoutNavigationController.cs index 561d193..403d2aa 100644 --- a/FlyoutNavigation/FlyoutNavigationController.cs +++ b/FlyoutNavigation/FlyoutNavigationController.cs @@ -519,8 +519,17 @@ CGRect GetViewBounds() { CGRect frame = View.Bounds; if ((InterfaceOrientation == UIInterfaceOrientation.LandscapeLeft || InterfaceOrientation == UIInterfaceOrientation.LandscapeRight)) { + #if UNIFIED var width = NMath.Max (frame.Width, frame.Height); + #else + var width = Math.Max(frame.Width, frame.Height); + #endif + + #if UNIFIED var height = NMath.Min (frame.Width, frame.Height); + #else + var height = Math.Min(frame.Width, frame.Height); + #endif frame.Width = width; frame.Height = height; } From 5b6fae70a9e8b64221ce2b6d619abdcaa815d0ee Mon Sep 17 00:00:00 2001 From: James Clancey Date: Fri, 12 Dec 2014 12:18:30 -0900 Subject: [PATCH 04/11] fixed silly bug --- FlyoutNavigation/FlyoutNavigationController.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/FlyoutNavigation/FlyoutNavigationController.cs b/FlyoutNavigation/FlyoutNavigationController.cs index 403d2aa..2c3c262 100644 --- a/FlyoutNavigation/FlyoutNavigationController.cs +++ b/FlyoutNavigation/FlyoutNavigationController.cs @@ -400,7 +400,6 @@ public override void ViewWillAppear(bool animated) View.BackgroundColor = NavigationTableView.BackgroundColor; var frame = mainView.Frame; setViewSize (); - frame.Size = mainView.Frame.Size; SetLocation (frame); navigation.OnSelection += NavigationItemSelected; base.ViewWillAppear(animated); @@ -410,7 +409,6 @@ public override void ViewDidAppear (bool animated) base.ViewDidAppear (animated); var frame = mainView.Frame; setViewSize (); - frame.Size = mainView.Frame.Size; SetLocation (frame); } public override void ViewWillDisappear (bool animated) @@ -510,7 +508,7 @@ void setViewSize() CGRect frame = GetViewBounds(); frame.Width -= ShouldStayOpen ? menuWidth : 0; - mainView.Frame = frame; + mainView.Bounds = frame; DisplayMenuBorder(mainView.Frame); } From dc0839c1d994c9188652882ca9423d85ba07d315 Mon Sep 17 00:00:00 2001 From: moljac Date: Mon, 22 Dec 2014 09:42:12 +0100 Subject: [PATCH 05/11] Xamarin.iOS unified 8.6 fixes defines UNIFIED || __UNIFIED__ added common solution for Xamarin.iOS - just fore easier comparison and testing --- FlyoutNavigation-Unified.sln | 46 +++++++ FlyoutNavigation.sln | 117 +++++++++++------- FlyoutNavigation/FlyoutNavigation.csproj | 2 + .../FlyoutNavigationController.cs | 4 +- 4 files changed, 121 insertions(+), 48 deletions(-) create mode 100644 FlyoutNavigation-Unified.sln diff --git a/FlyoutNavigation-Unified.sln b/FlyoutNavigation-Unified.sln new file mode 100644 index 0000000..00445c5 --- /dev/null +++ b/FlyoutNavigation-Unified.sln @@ -0,0 +1,46 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyoutNavigationSample", "FlyoutNavigationSample\FlyoutNavigationSample\FlyoutNavigationSample.csproj", "{F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyoutNavigation", "FlyoutNavigation\FlyoutNavigation.csproj", "{E98F7600-6C2E-4586-A78C-D42BA89445B9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + Debug|iPhoneSimulator = Debug|iPhoneSimulator + Release|iPhoneSimulator = Release|iPhoneSimulator + Debug|iPhone = Debug|iPhone + Release|iPhone = Release|iPhone + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhone.Build.0 = Debug|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|Any CPU.Build.0 = Release|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhone.ActiveCfg = Release|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhone.Build.0 = Release|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhone.ActiveCfg = Debug|iPhone + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhone.Build.0 = Debug|iPhone + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|Any CPU.Build.0 = Release|iPhoneSimulator + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhone.ActiveCfg = Release|iPhone + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhone.Build.0 = Release|iPhone + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator + EndGlobalSection + GlobalSection(MonoDevelopProperties) = preSolution + StartupItem = FlyoutNavigationSample\FlyoutNavigationSample\FlyoutNavigationSample.csproj + EndGlobalSection +EndGlobal diff --git a/FlyoutNavigation.sln b/FlyoutNavigation.sln index 00445c5..79f03e0 100644 --- a/FlyoutNavigation.sln +++ b/FlyoutNavigation.sln @@ -1,46 +1,71 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyoutNavigationSample", "FlyoutNavigationSample\FlyoutNavigationSample\FlyoutNavigationSample.csproj", "{F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyoutNavigation", "FlyoutNavigation\FlyoutNavigation.csproj", "{E98F7600-6C2E-4586-A78C-D42BA89445B9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - Debug|iPhoneSimulator = Debug|iPhoneSimulator - Release|iPhoneSimulator = Release|iPhoneSimulator - Debug|iPhone = Debug|iPhone - Release|iPhone = Release|iPhone - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhone.Build.0 = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|Any CPU.Build.0 = Release|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhone.ActiveCfg = Release|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhone.Build.0 = Release|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhone.ActiveCfg = Debug|iPhone - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhone.Build.0 = Debug|iPhone - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|Any CPU.Build.0 = Release|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhone.ActiveCfg = Release|iPhone - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhone.Build.0 = Release|iPhone - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - EndGlobalSection - GlobalSection(MonoDevelopProperties) = preSolution - StartupItem = FlyoutNavigationSample\FlyoutNavigationSample\FlyoutNavigationSample.csproj - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyoutNavigationSample", "FlyoutNavigationSample\FlyoutNavigationSample\FlyoutNavigationSample.csproj", "{AAA188F1-E969-4095-BC66-59717D7638BB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyoutNavigation", "FlyoutNavigation\FlyoutNavigation.csproj", "{BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyoutNavigation-Classic", "FlyoutNavigation\FlyoutNavigation-Classic.csproj", "{E98F7600-6C2E-4586-A78C-D42BA89445B9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyOutNavigationSample-Classic", "FlyoutNavigationSample\FlyoutNavigationSample\FlyOutNavigationSample-Classic.csproj", "{F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + Debug|iPhoneSimulator = Debug|iPhoneSimulator + Release|iPhoneSimulator = Release|iPhoneSimulator + Debug|iPhone = Debug|iPhone + Release|iPhone = Release|iPhone + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AAA188F1-E969-4095-BC66-59717D7638BB}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator + {AAA188F1-E969-4095-BC66-59717D7638BB}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator + {AAA188F1-E969-4095-BC66-59717D7638BB}.Debug|iPhone.ActiveCfg = Debug|iPhone + {AAA188F1-E969-4095-BC66-59717D7638BB}.Debug|iPhone.Build.0 = Debug|iPhone + {AAA188F1-E969-4095-BC66-59717D7638BB}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator + {AAA188F1-E969-4095-BC66-59717D7638BB}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator + {AAA188F1-E969-4095-BC66-59717D7638BB}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator + {AAA188F1-E969-4095-BC66-59717D7638BB}.Release|Any CPU.Build.0 = Release|iPhoneSimulator + {AAA188F1-E969-4095-BC66-59717D7638BB}.Release|iPhone.ActiveCfg = Release|iPhone + {AAA188F1-E969-4095-BC66-59717D7638BB}.Release|iPhone.Build.0 = Release|iPhone + {AAA188F1-E969-4095-BC66-59717D7638BB}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator + {AAA188F1-E969-4095-BC66-59717D7638BB}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Debug|iPhone.Build.0 = Debug|Any CPU + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Release|Any CPU.Build.0 = Release|Any CPU + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Release|iPhone.ActiveCfg = Release|Any CPU + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Release|iPhone.Build.0 = Release|Any CPU + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhone.Build.0 = Debug|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|Any CPU.Build.0 = Release|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhone.ActiveCfg = Release|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhone.Build.0 = Release|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhone.ActiveCfg = Debug|iPhone + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhone.Build.0 = Debug|iPhone + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|Any CPU.Build.0 = Release|iPhoneSimulator + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhone.ActiveCfg = Release|iPhone + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhone.Build.0 = Release|iPhone + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator + EndGlobalSection +EndGlobal diff --git a/FlyoutNavigation/FlyoutNavigation.csproj b/FlyoutNavigation/FlyoutNavigation.csproj index be7e035..5485077 100644 --- a/FlyoutNavigation/FlyoutNavigation.csproj +++ b/FlyoutNavigation/FlyoutNavigation.csproj @@ -8,6 +8,8 @@ Library FlyoutNavigation FlyoutNavigation + 8.0.30703 + 2.0 True diff --git a/FlyoutNavigation/FlyoutNavigationController.cs b/FlyoutNavigation/FlyoutNavigationController.cs index 2c3c262..8794dfc 100644 --- a/FlyoutNavigation/FlyoutNavigationController.cs +++ b/FlyoutNavigation/FlyoutNavigationController.cs @@ -517,13 +517,13 @@ CGRect GetViewBounds() { CGRect frame = View.Bounds; if ((InterfaceOrientation == UIInterfaceOrientation.LandscapeLeft || InterfaceOrientation == UIInterfaceOrientation.LandscapeRight)) { - #if UNIFIED + #if UNIFIED || __UNIFIED__ var width = NMath.Max (frame.Width, frame.Height); #else var width = Math.Max(frame.Width, frame.Height); #endif - #if UNIFIED + #if UNIFIED || __UNIFIED__ var height = NMath.Min (frame.Width, frame.Height); #else var height = Math.Min(frame.Width, frame.Height); From 3fa98cc1aa801f9c1f8adea47f9da19465f9cee1 Mon Sep 17 00:00:00 2001 From: moljac Date: Mon, 22 Dec 2014 09:51:13 +0100 Subject: [PATCH 06/11] Xamarin.iOS classic fixed missing files in projects fixed namespaces, aliases to match Xamarin.iOS 8.6 --- .../FlyOutNavigationSample-Classic.csproj | 5 +++++ .../MyStoryboardViewcontroller.cs | 5 +++++ .../MyStoryboardViewcontroller.designer.cs | 7 ++++++- .../SwipableTableView.cs | 19 ++++++++++++++----- 4 files changed, 30 insertions(+), 6 deletions(-) diff --git a/FlyoutNavigationSample/FlyoutNavigationSample/FlyOutNavigationSample-Classic.csproj b/FlyoutNavigationSample/FlyoutNavigationSample/FlyOutNavigationSample-Classic.csproj index b1aa132..ba53e69 100755 --- a/FlyoutNavigationSample/FlyoutNavigationSample/FlyOutNavigationSample-Classic.csproj +++ b/FlyoutNavigationSample/FlyoutNavigationSample/FlyOutNavigationSample-Classic.csproj @@ -81,6 +81,11 @@ + + + + MyStoryboardViewController.cs + diff --git a/FlyoutNavigationSample/FlyoutNavigationSample/MyStoryboardViewcontroller.cs b/FlyoutNavigationSample/FlyoutNavigationSample/MyStoryboardViewcontroller.cs index 6d406b1..a66e258 100644 --- a/FlyoutNavigationSample/FlyoutNavigationSample/MyStoryboardViewcontroller.cs +++ b/FlyoutNavigationSample/FlyoutNavigationSample/MyStoryboardViewcontroller.cs @@ -1,6 +1,11 @@ using System; +#if __UNIFIED__ using Foundation; using UIKit; +#else +using MonoTouch.Foundation; +using MonoTouch.UIKit; +#endif using System.CodeDom.Compiler; namespace Sample diff --git a/FlyoutNavigationSample/FlyoutNavigationSample/MyStoryboardViewcontroller.designer.cs b/FlyoutNavigationSample/FlyoutNavigationSample/MyStoryboardViewcontroller.designer.cs index 31ab33d..a93410b 100644 --- a/FlyoutNavigationSample/FlyoutNavigationSample/MyStoryboardViewcontroller.designer.cs +++ b/FlyoutNavigationSample/FlyoutNavigationSample/MyStoryboardViewcontroller.designer.cs @@ -4,10 +4,15 @@ // actions declared in your storyboard file. // Manual changes to this file will not be maintained. // -using Foundation; using System; using System.CodeDom.Compiler; +#if __UNIFIED__ using UIKit; +using Foundation; +#else +using MonoTouch.UIKit; +using MonoTouch.Foundation; +#endif namespace Sample { diff --git a/FlyoutNavigationSample/FlyoutNavigationSample/SwipableTableView.cs b/FlyoutNavigationSample/FlyoutNavigationSample/SwipableTableView.cs index 4919f69..5263757 100644 --- a/FlyoutNavigationSample/FlyoutNavigationSample/SwipableTableView.cs +++ b/FlyoutNavigationSample/FlyoutNavigationSample/SwipableTableView.cs @@ -1,8 +1,17 @@ using System; -using UIKit; using System.Collections.Generic; using System.Linq; + +#if __UNIFIED__ +using UIKit; +using Foundation; +#else +using MonoTouch.UIKit; +using MonoTouch.Foundation; +using nint=System.Int32; +#endif + namespace Sample { public class SwipableTableView : UITableViewController @@ -24,7 +33,7 @@ public MyDataSource() { Rows = Enumerable.Range(0,20).Select(x=> string.Format("Row {0}",x)).ToList(); } - public override UITableViewCell GetCell (UITableView tableView, Foundation.NSIndexPath indexPath) + public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath) { var cell = tableView.DequeueReusableCell ("cell") ?? new UITableViewCell (UITableViewCellStyle.Default,"cell"); cell.TextLabel.Text = Rows [indexPath.Row]; @@ -35,15 +44,15 @@ public override nint RowsInSection (UITableView tableview, nint section) return (nint)Rows.Count; } - public override UITableViewCellEditingStyle EditingStyleForRow (UITableView tableView, Foundation.NSIndexPath indexPath) + public override UITableViewCellEditingStyle EditingStyleForRow (UITableView tableView, NSIndexPath indexPath) { return UITableViewCellEditingStyle.Delete; } - public override bool CanEditRow (UITableView tableView, Foundation.NSIndexPath indexPath) + public override bool CanEditRow (UITableView tableView, NSIndexPath indexPath) { return true; } - public override void CommitEditingStyle (UITableView tableView, UITableViewCellEditingStyle editingStyle, Foundation.NSIndexPath indexPath) + public override void CommitEditingStyle (UITableView tableView, UITableViewCellEditingStyle editingStyle, NSIndexPath indexPath) { if (editingStyle == UITableViewCellEditingStyle.Delete) { Rows.RemoveAt (indexPath.Row); From c46cee23c72c8cf93c96d2838f556bf8b4398069 Mon Sep 17 00:00:00 2001 From: McCarty Date: Mon, 4 May 2015 10:27:14 -0500 Subject: [PATCH 07/11] Added BeginAnimation EndAnimation and OpenChanged events --- .../FlyoutNavigationController.cs | 70 ++++++++++++++++--- 1 file changed, 62 insertions(+), 8 deletions(-) diff --git a/FlyoutNavigation/FlyoutNavigationController.cs b/FlyoutNavigation/FlyoutNavigationController.cs index 990d8da..3bc7bbe 100644 --- a/FlyoutNavigation/FlyoutNavigationController.cs +++ b/FlyoutNavigation/FlyoutNavigationController.cs @@ -287,7 +287,6 @@ void Initialize(UITableViewStyle navigationStyle = UITableViewStyle.Plain) View.AddGestureRecognizer (openGesture = new UIScreenEdgePanGestureRecognizer(() => DragContentView (openGesture)){Edges = Position == FlyOutNavigationPosition.Left ? UIRectEdge.Left : UIRectEdge.Right}); View.AddGestureRecognizer (closeGesture = new OpenMenuGestureRecognizer (DragContentView, shouldReceiveTouch)); - } void CloseButtonTapped (object sender, EventArgs e) { @@ -336,6 +335,52 @@ public override void ViewDidLayoutSubviews() } } + public event EventHandler BeginAnimation; + public event EventHandler EndAnimation; + public event EventHandler OpenChanged; + private bool _prevIsOpen = false; + + public class OpenChangedEventArgs : EventArgs + { + public OpenChangedEventArgs(bool isOpen){IsOpen = isOpen;} + public bool IsOpen { get; set; } + } + + protected virtual void OnBeginAnimation(EventArgs e) + { + EventHandler handler = BeginAnimation; + if (handler != null) + { + handler (this, e); + } + } + + protected virtual void OnEndAnimation(EventArgs e) + { + EventHandler handler = EndAnimation; + if(handler != null) + { + handler (this, e); + } + } + + protected void CheckRaiseOpenChanged(){ + OnEndAnimation (EventArgs.Empty); + if(_prevIsOpen != IsOpen){ + OnOpenChanged (new OpenChangedEventArgs (IsOpen)); + _prevIsOpen = IsOpen; + } + } + + protected virtual void OnOpenChanged(OpenChangedEventArgs e) + { + EventHandler handler = OpenChanged; + if(handler != null) + { + handler (this, e); + } + } + public void DragContentView(UIGestureRecognizer gesture) { var panGesture = gesture as UIPanGestureRecognizer; @@ -349,6 +394,7 @@ public void DragContentView(UIGestureRecognizer gesture) var translation = panGesture.TranslationInView(View).X; if (panGesture.State == UIGestureRecognizerState.Began) { + OnBeginAnimation (EventArgs.Empty); startX = frame.X; } else if (panGesture.State == UIGestureRecognizerState.Changed) @@ -481,18 +527,25 @@ public void ShowMenu() //menuBorder.Frame.Width = 1f; View.InsertSubviewBelow(menuBorder, mainView); } - UIView.BeginAnimations("slideMenu"); + + }); + + OnBeginAnimation (EventArgs.Empty); + UIView.Animate(.2, () => + { UIView.SetAnimationCurve(UIViewAnimationCurve.EaseIn); - //UIView.SetAnimationDuration(2); - setViewSize(); CGRect frame = mainView.Frame; frame.X = Position == FlyOutNavigationPosition.Left ? menuWidth : -menuWidth; - SetLocation(frame); setViewSize(); - frame = mainView.Frame; + SetLocation(frame); shadowView.Frame = frame; - UIView.CommitAnimations(); - }); + }, showComplete); + + } + + void showComplete() + { + CheckRaiseOpenChanged (); } void setViewSize() @@ -595,6 +648,7 @@ void hideComplete() { shadowView.RemoveFromSuperview(); navigation.View.Hidden = true; + CheckRaiseOpenChanged (); } public void ResignFirstResponders(UIView view) From 9a333d868895057e7554d9fff57072d80ed41c96 Mon Sep 17 00:00:00 2001 From: James Clancey Date: Fri, 22 Jul 2016 12:24:36 -0800 Subject: [PATCH 08/11] Changed the main solution to be the unified --- FlyoutNavigation-Unified.sln | 46 -------------- FlyoutNavigation.sln | 115 ++++++++++++++--------------------- 2 files changed, 46 insertions(+), 115 deletions(-) delete mode 100644 FlyoutNavigation-Unified.sln diff --git a/FlyoutNavigation-Unified.sln b/FlyoutNavigation-Unified.sln deleted file mode 100644 index 00445c5..0000000 --- a/FlyoutNavigation-Unified.sln +++ /dev/null @@ -1,46 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyoutNavigationSample", "FlyoutNavigationSample\FlyoutNavigationSample\FlyoutNavigationSample.csproj", "{F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyoutNavigation", "FlyoutNavigation\FlyoutNavigation.csproj", "{E98F7600-6C2E-4586-A78C-D42BA89445B9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - Debug|iPhoneSimulator = Debug|iPhoneSimulator - Release|iPhoneSimulator = Release|iPhoneSimulator - Debug|iPhone = Debug|iPhone - Release|iPhone = Release|iPhone - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhone.Build.0 = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|Any CPU.Build.0 = Release|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhone.ActiveCfg = Release|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhone.Build.0 = Release|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhone.ActiveCfg = Debug|iPhone - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhone.Build.0 = Debug|iPhone - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|Any CPU.Build.0 = Release|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhone.ActiveCfg = Release|iPhone - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhone.Build.0 = Release|iPhone - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - EndGlobalSection - GlobalSection(MonoDevelopProperties) = preSolution - StartupItem = FlyoutNavigationSample\FlyoutNavigationSample\FlyoutNavigationSample.csproj - EndGlobalSection -EndGlobal diff --git a/FlyoutNavigation.sln b/FlyoutNavigation.sln index 9084908..00445c5 100644 --- a/FlyoutNavigation.sln +++ b/FlyoutNavigation.sln @@ -1,69 +1,46 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyoutNavigationSample", "FlyoutNavigationSample\FlyoutNavigationSample\FlyoutNavigationSample.csproj", "{AAA188F1-E969-4095-BC66-59717D7638BB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyoutNavigation-Classic", "FlyoutNavigation\FlyoutNavigation-Classic.csproj", "{E98F7600-6C2E-4586-A78C-D42BA89445B9}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyOutNavigationSample-Classic", "FlyoutNavigationSample\FlyoutNavigationSample\FlyOutNavigationSample-Classic.csproj", "{F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - Debug|iPhoneSimulator = Debug|iPhoneSimulator - Release|iPhoneSimulator = Release|iPhoneSimulator - Debug|iPhone = Debug|iPhone - Release|iPhone = Release|iPhone - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {AAA188F1-E969-4095-BC66-59717D7638BB}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator - {AAA188F1-E969-4095-BC66-59717D7638BB}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator - {AAA188F1-E969-4095-BC66-59717D7638BB}.Debug|iPhone.ActiveCfg = Debug|iPhone - {AAA188F1-E969-4095-BC66-59717D7638BB}.Debug|iPhone.Build.0 = Debug|iPhone - {AAA188F1-E969-4095-BC66-59717D7638BB}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator - {AAA188F1-E969-4095-BC66-59717D7638BB}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator - {AAA188F1-E969-4095-BC66-59717D7638BB}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator - {AAA188F1-E969-4095-BC66-59717D7638BB}.Release|Any CPU.Build.0 = Release|iPhoneSimulator - {AAA188F1-E969-4095-BC66-59717D7638BB}.Release|iPhone.ActiveCfg = Release|iPhone - {AAA188F1-E969-4095-BC66-59717D7638BB}.Release|iPhone.Build.0 = Release|iPhone - {AAA188F1-E969-4095-BC66-59717D7638BB}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {AAA188F1-E969-4095-BC66-59717D7638BB}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Debug|iPhone.Build.0 = Debug|Any CPU - {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Release|Any CPU.Build.0 = Release|Any CPU - {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Release|iPhone.ActiveCfg = Release|Any CPU - {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Release|iPhone.Build.0 = Release|Any CPU - {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhone.Build.0 = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|Any CPU.Build.0 = Release|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhone.ActiveCfg = Release|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhone.Build.0 = Release|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhone.ActiveCfg = Debug|iPhone - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhone.Build.0 = Debug|iPhone - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|Any CPU.Build.0 = Release|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhone.ActiveCfg = Release|iPhone - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhone.Build.0 = Release|iPhone - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyoutNavigationSample", "FlyoutNavigationSample\FlyoutNavigationSample\FlyoutNavigationSample.csproj", "{F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyoutNavigation", "FlyoutNavigation\FlyoutNavigation.csproj", "{E98F7600-6C2E-4586-A78C-D42BA89445B9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + Debug|iPhoneSimulator = Debug|iPhoneSimulator + Release|iPhoneSimulator = Release|iPhoneSimulator + Debug|iPhone = Debug|iPhone + Release|iPhone = Release|iPhone + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhone.Build.0 = Debug|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|Any CPU.Build.0 = Release|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhone.ActiveCfg = Release|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhone.Build.0 = Release|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhone.ActiveCfg = Debug|iPhone + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhone.Build.0 = Debug|iPhone + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|Any CPU.Build.0 = Release|iPhoneSimulator + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhone.ActiveCfg = Release|iPhone + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhone.Build.0 = Release|iPhone + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator + {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator + EndGlobalSection + GlobalSection(MonoDevelopProperties) = preSolution + StartupItem = FlyoutNavigationSample\FlyoutNavigationSample\FlyoutNavigationSample.csproj + EndGlobalSection +EndGlobal From 7c74cf37918da3de9c18867c18f11de51e5cfcbf Mon Sep 17 00:00:00 2001 From: James Clancey Date: Tue, 26 Jul 2016 13:09:50 -0800 Subject: [PATCH 09/11] Added UITests --- .gitignore | 3 +- FlyoutNavigation.sln | 66 +++++++++++-------- FlyoutNavigation/FlyoutNavigation.csproj | 3 + .../FlyoutNavigationSample/AppDelegate.cs | 1 + .../FlyoutNavigationSample.csproj | 5 ++ .../FlyoutNavigationSample/packages.config | 4 ++ Tests/AppInitializer.cs | 41 ++++++++++++ Tests/Tests.cs | 63 ++++++++++++++++++ Tests/Tests.csproj | 46 +++++++++++++ Tests/packages.config | 5 ++ 10 files changed, 210 insertions(+), 27 deletions(-) create mode 100644 FlyoutNavigationSample/FlyoutNavigationSample/packages.config create mode 100644 Tests/AppInitializer.cs create mode 100644 Tests/Tests.cs create mode 100644 Tests/Tests.csproj create mode 100644 Tests/packages.config diff --git a/.gitignore b/.gitignore index 871e136..2d9c2bb 100644 --- a/.gitignore +++ b/.gitignore @@ -50,4 +50,5 @@ BASE.* /nunit-result.xml /test-results *.DS_Store -*.ipa \ No newline at end of file +*.ipa +[Pp]ackages \ No newline at end of file diff --git a/FlyoutNavigation.sln b/FlyoutNavigation.sln index 00445c5..c61f64e 100644 --- a/FlyoutNavigation.sln +++ b/FlyoutNavigation.sln @@ -1,9 +1,11 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyoutNavigationSample", "FlyoutNavigationSample\FlyoutNavigationSample\FlyoutNavigationSample.csproj", "{F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyoutNavigationSample", "FlyoutNavigationSample\FlyoutNavigationSample\FlyoutNavigationSample.csproj", "{AAA188F1-E969-4095-BC66-59717D7638BB}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyoutNavigation", "FlyoutNavigation\FlyoutNavigation.csproj", "{E98F7600-6C2E-4586-A78C-D42BA89445B9}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyoutNavigation", "FlyoutNavigation\FlyoutNavigation.csproj", "{BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{C0DD6455-C412-486C-96B0-7213C62B0674}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -15,30 +17,42 @@ Global Release|iPhone = Release|iPhone EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhone.Build.0 = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|Any CPU.Build.0 = Release|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhone.ActiveCfg = Release|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhone.Build.0 = Release|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {E98F7600-6C2E-4586-A78C-D42BA89445B9}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhone.ActiveCfg = Debug|iPhone - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhone.Build.0 = Debug|iPhone - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|Any CPU.Build.0 = Release|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhone.ActiveCfg = Release|iPhone - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhone.Build.0 = Release|iPhone - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {F7F9CC1F-0E0A-4E5D-A1B1-BB977A0CD36B}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator + {AAA188F1-E969-4095-BC66-59717D7638BB}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator + {AAA188F1-E969-4095-BC66-59717D7638BB}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator + {AAA188F1-E969-4095-BC66-59717D7638BB}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator + {AAA188F1-E969-4095-BC66-59717D7638BB}.Release|Any CPU.Build.0 = Release|iPhoneSimulator + {AAA188F1-E969-4095-BC66-59717D7638BB}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator + {AAA188F1-E969-4095-BC66-59717D7638BB}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator + {AAA188F1-E969-4095-BC66-59717D7638BB}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator + {AAA188F1-E969-4095-BC66-59717D7638BB}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator + {AAA188F1-E969-4095-BC66-59717D7638BB}.Debug|iPhone.ActiveCfg = Debug|iPhone + {AAA188F1-E969-4095-BC66-59717D7638BB}.Debug|iPhone.Build.0 = Debug|iPhone + {AAA188F1-E969-4095-BC66-59717D7638BB}.Release|iPhone.ActiveCfg = Release|iPhone + {AAA188F1-E969-4095-BC66-59717D7638BB}.Release|iPhone.Build.0 = Release|iPhone + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Release|Any CPU.Build.0 = Release|Any CPU + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Debug|iPhone.Build.0 = Debug|Any CPU + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Release|iPhone.ActiveCfg = Release|Any CPU + {BEC8904A-0E39-4117-9E4D-AAE6A6A50B4A}.Release|iPhone.Build.0 = Release|Any CPU + {C0DD6455-C412-486C-96B0-7213C62B0674}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C0DD6455-C412-486C-96B0-7213C62B0674}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C0DD6455-C412-486C-96B0-7213C62B0674}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C0DD6455-C412-486C-96B0-7213C62B0674}.Release|Any CPU.Build.0 = Release|Any CPU + {C0DD6455-C412-486C-96B0-7213C62B0674}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {C0DD6455-C412-486C-96B0-7213C62B0674}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {C0DD6455-C412-486C-96B0-7213C62B0674}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {C0DD6455-C412-486C-96B0-7213C62B0674}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {C0DD6455-C412-486C-96B0-7213C62B0674}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {C0DD6455-C412-486C-96B0-7213C62B0674}.Debug|iPhone.Build.0 = Debug|Any CPU + {C0DD6455-C412-486C-96B0-7213C62B0674}.Release|iPhone.ActiveCfg = Release|Any CPU + {C0DD6455-C412-486C-96B0-7213C62B0674}.Release|iPhone.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution StartupItem = FlyoutNavigationSample\FlyoutNavigationSample\FlyoutNavigationSample.csproj diff --git a/FlyoutNavigation/FlyoutNavigation.csproj b/FlyoutNavigation/FlyoutNavigation.csproj index 576217a..81279ce 100644 --- a/FlyoutNavigation/FlyoutNavigation.csproj +++ b/FlyoutNavigation/FlyoutNavigation.csproj @@ -8,6 +8,9 @@ Library FlyoutNavigation FlyoutNavigation + 8.0.30703 + 2.0 + obj\unified True diff --git a/FlyoutNavigationSample/FlyoutNavigationSample/AppDelegate.cs b/FlyoutNavigationSample/FlyoutNavigationSample/AppDelegate.cs index 8bae11c..6d4cc15 100644 --- a/FlyoutNavigationSample/FlyoutNavigationSample/AppDelegate.cs +++ b/FlyoutNavigationSample/FlyoutNavigationSample/AppDelegate.cs @@ -22,6 +22,7 @@ public partial class AppDelegate : UIApplicationDelegate public override bool FinishedLaunching (UIApplication app, NSDictionary options) { + Xamarin.Calabash.Start (); window = new UIWindow (UIScreen.MainScreen.Bounds) { RootViewController = new MainController () }; diff --git a/FlyoutNavigationSample/FlyoutNavigationSample/FlyoutNavigationSample.csproj b/FlyoutNavigationSample/FlyoutNavigationSample/FlyoutNavigationSample.csproj index d60f50d..20b866b 100644 --- a/FlyoutNavigationSample/FlyoutNavigationSample/FlyoutNavigationSample.csproj +++ b/FlyoutNavigationSample/FlyoutNavigationSample/FlyoutNavigationSample.csproj @@ -10,6 +10,7 @@ Exe Sample Sample + obj\unified True @@ -93,9 +94,13 @@ + + ..\..\packages\Xamarin.TestCloud.Agent.0.19.2\lib\Xamarin.iOS10\Calabash.dll + + diff --git a/FlyoutNavigationSample/FlyoutNavigationSample/packages.config b/FlyoutNavigationSample/FlyoutNavigationSample/packages.config new file mode 100644 index 0000000..ca1dd23 --- /dev/null +++ b/FlyoutNavigationSample/FlyoutNavigationSample/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Tests/AppInitializer.cs b/Tests/AppInitializer.cs new file mode 100644 index 0000000..aaca013 --- /dev/null +++ b/Tests/AppInitializer.cs @@ -0,0 +1,41 @@ +using System; +using System.IO; +using System.Linq; +using Xamarin.UITest; +using Xamarin.UITest.Queries; + +namespace Tests +{ + public class AppInitializer + { + public static IApp StartApp (Platform platform) + { + // TODO: If the iOS or Android app being tested is included in the solution + // then open the Unit Tests window, right click Test Apps, select Add App Project + // and select the app projects that should be tested. + // + // The iOS project should have the Xamarin.TestCloud.Agent NuGet package + // installed. To start the Test Cloud Agent the following code should be + // added to the FinishedLaunching method of the AppDelegate: + // + // #if ENABLE_TEST_CLOUD + // Xamarin.Calabash.Start(); + // #endif + if (platform == Platform.Android) { + return ConfigureApp + .Android + // TODO: Update this path to point to your Android app and uncomment the + // code if the app is not included in the solution. + //.ApkFile ("../../../Droid/bin/Debug/xamarinforms.apk") + .StartApp (); + } + + return ConfigureApp + .iOS + // TODO: Update this path to point to your iOS app and uncomment the + // code if the app is not included in the solution. + .AppBundle ("../../../FlyoutNavigationSample/FlyoutNavigationSample/bin/unified/iPhoneSimulator/Debug/Sample.app") + .StartApp (); + } + } +} diff --git a/Tests/Tests.cs b/Tests/Tests.cs new file mode 100644 index 0000000..7c58849 --- /dev/null +++ b/Tests/Tests.cs @@ -0,0 +1,63 @@ +using System; +using System.IO; +using System.Linq; +using NUnit.Framework; +using Xamarin.UITest; +using Xamarin.UITest.Queries; + +namespace Tests +{ + //[TestFixture (Platform.Android)] + [TestFixture (Platform.iOS)] + public class Tests + { + IApp app; + Platform platform; + + public Tests (Platform platform) + { + this.platform = platform; + } + + [SetUp] + public void BeforeEachTest () + { + app = AppInitializer.StartApp (platform); + } + + [Test] + public void AppLaunches () + { + app.Screenshot ("First screen."); + } + + [Test] + public void MenuButtonWorks () + { + app.Screenshot ("App Launched"); + + app.Tap (x => x.Class ("UINavigationButton").Marked ("Share")); + + app.Screenshot ("Menu Opened"); + + app.Tap (x => x.Marked ("Learn C#")); + + app.Screenshot ("Learn C#"); + } + + [Test] + public void SwipeWorks () + { + app.Screenshot ("App Launched"); + + app.SwipeLeftToRight (); + + app.Screenshot ("Menu Opened"); + + app.Tap (x => x.Marked ("Learn C#")); + + app.Screenshot ("Learn C#"); + } + + } +} diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj new file mode 100644 index 0000000..67a99f3 --- /dev/null +++ b/Tests/Tests.csproj @@ -0,0 +1,46 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {C0DD6455-C412-486C-96B0-7213C62B0674} + Library + Tests + Tests + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + + + true + bin\Release + prompt + 4 + + + + + ..\packages\NUnit.2.6.3\lib\nunit.framework.dll + + + ..\packages\Xamarin.UITest.1.3.12\lib\Xamarin.UITest.dll + + + + + + + + + + + \ No newline at end of file diff --git a/Tests/packages.config b/Tests/packages.config new file mode 100644 index 0000000..b939d53 --- /dev/null +++ b/Tests/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file From a1f8dcde594108d3be283fd8890ebdcab1052d10 Mon Sep 17 00:00:00 2001 From: James Clancey Date: Tue, 26 Jul 2016 14:07:32 -0800 Subject: [PATCH 10/11] Build IPA on device build --- .../FlyoutNavigationSample.csproj | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/FlyoutNavigationSample/FlyoutNavigationSample/FlyoutNavigationSample.csproj b/FlyoutNavigationSample/FlyoutNavigationSample/FlyoutNavigationSample.csproj index 20b866b..3c4f790 100644 --- a/FlyoutNavigationSample/FlyoutNavigationSample/FlyoutNavigationSample.csproj +++ b/FlyoutNavigationSample/FlyoutNavigationSample/FlyoutNavigationSample.csproj @@ -16,7 +16,7 @@ True full False - bin\iPhoneSimulator\Debug + bin\unified\iPhoneSimulator\Debug DEBUG;__UNIFIED__; prompt 4 @@ -35,7 +35,7 @@ none False - bin\iPhoneSimulator\Release + bin\unified\iPhoneSimulator\Release prompt 4 False @@ -53,7 +53,7 @@ True full False - bin\iPhone\Debug + bin\unified\iPhone\Debug DEBUG; prompt 4 @@ -74,7 +74,7 @@ none False - bin\iPhone\Release + bin\unified\iPhone\Release prompt 4 False @@ -87,6 +87,8 @@ ARMv7 + true + Sample From b5b61dde9385ca95fb349d81395076ca1c7bc7df Mon Sep 17 00:00:00 2001 From: James Clancey Date: Thu, 22 Sep 2016 14:14:46 -0700 Subject: [PATCH 11/11] Fixes #84 --- FlyoutNavigationSample/FlyoutNavigationSample/Info.plist | 2 +- .../FlyoutNavigationSample/MainController.cs | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/FlyoutNavigationSample/FlyoutNavigationSample/Info.plist b/FlyoutNavigationSample/FlyoutNavigationSample/Info.plist index 55c1472..2996aae 100644 --- a/FlyoutNavigationSample/FlyoutNavigationSample/Info.plist +++ b/FlyoutNavigationSample/FlyoutNavigationSample/Info.plist @@ -21,6 +21,6 @@ UIInterfaceOrientationLandscapeRight MinimumOSVersion - 5.2 + 6.0 diff --git a/FlyoutNavigationSample/FlyoutNavigationSample/MainController.cs b/FlyoutNavigationSample/FlyoutNavigationSample/MainController.cs index d2fb466..99282bf 100644 --- a/FlyoutNavigationSample/FlyoutNavigationSample/MainController.cs +++ b/FlyoutNavigationSample/FlyoutNavigationSample/MainController.cs @@ -40,13 +40,12 @@ public override void ViewDidLoad () navigation.View.Frame = UIScreen.MainScreen.Bounds; View.AddSubview (navigation.View); this.AddChildViewController (navigation); - + + var taskList = new Section ("Task List"); + taskList.AddAll (Tasks.Select (x => new StringElement (x))); // Create the menu: navigation.NavigationRoot = new RootElement ("Task List") { - new Section ("Task List") { - from page in Tasks - select new StringElement (page) as Element - }, + taskList, new Section ("Extras") { new BooleanElement("Toggle",true),