summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.iOS
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@users.noreply.github.com>2016-04-25 10:52:48 -0600
committerRui Marinho <me@ruimarinho.net>2016-04-25 12:52:48 -0400
commit07df05ced2b43446c84d47f4b7a8325abcd0f767 (patch)
tree21ac508248e24266a884f9bf0fc28acadf7978fc /Xamarin.Forms.Platform.iOS
parent6c0c11960b26c4ccb3322fec04e0eb6f55d9da07 (diff)
downloadxamarin-forms-07df05ced2b43446c84d47f4b7a8325abcd0f767.tar.gz
xamarin-forms-07df05ced2b43446c84d47f4b7a8325abcd0f767.tar.bz2
xamarin-forms-07df05ced2b43446c84d47f4b7a8325abcd0f767.zip
Remove ToolBar from Core; Remove ToolBar renderers and unit tests (#124)
Diffstat (limited to 'Xamarin.Forms.Platform.iOS')
-rw-r--r--Xamarin.Forms.Platform.iOS/Properties/AssemblyInfo.cs1
-rw-r--r--Xamarin.Forms.Platform.iOS/Renderers/ToolbarRenderer.cs66
-rw-r--r--Xamarin.Forms.Platform.iOS/Xamarin.Forms.Platform.iOS.Classic.csproj13
-rw-r--r--Xamarin.Forms.Platform.iOS/Xamarin.Forms.Platform.iOS.csproj13
4 files changed, 16 insertions, 77 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Properties/AssemblyInfo.cs b/Xamarin.Forms.Platform.iOS/Properties/AssemblyInfo.cs
index 8ebe9ba1..da60a639 100644
--- a/Xamarin.Forms.Platform.iOS/Properties/AssemblyInfo.cs
+++ b/Xamarin.Forms.Platform.iOS/Properties/AssemblyInfo.cs
@@ -39,7 +39,6 @@ using MonoTouch.UIKit;
[assembly: ExportRenderer(typeof(Stepper), typeof(StepperRenderer))]
[assembly: ExportRenderer(typeof(ProgressBar), typeof(ProgressBarRenderer))]
[assembly: ExportRenderer(typeof(ScrollView), typeof(ScrollViewRenderer))]
-[assembly: ExportRenderer(typeof(Toolbar), typeof(ToolbarRenderer))]
[assembly: ExportRenderer(typeof(ActivityIndicator), typeof(ActivityIndicatorRenderer))]
[assembly: ExportRenderer(typeof(Frame), typeof(FrameRenderer))]
[assembly: ExportRenderer(typeof(NavigationMenu), typeof(NavigationMenuRenderer))]
diff --git a/Xamarin.Forms.Platform.iOS/Renderers/ToolbarRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/ToolbarRenderer.cs
deleted file mode 100644
index 705f95d8..00000000
--- a/Xamarin.Forms.Platform.iOS/Renderers/ToolbarRenderer.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-using System.Linq;
-using System.Drawing;
-#if __UNIFIED__
-using UIKit;
-
-#else
-using MonoTouch.UIKit;
-#endif
-
-namespace Xamarin.Forms.Platform.iOS
-{
- public class ToolbarRenderer : ViewRenderer
- {
- protected override void Dispose(bool disposing)
- {
- if (disposing)
- {
- ((Toolbar)Element).ItemAdded -= OnItemAdded;
- ((Toolbar)Element).ItemRemoved -= OnItemRemoved;
-
- if (((UIToolbar)Control).Items != null)
- {
- foreach (var item in ((UIToolbar)Control).Items)
- item.Dispose();
- }
- }
-
- base.Dispose(disposing);
- }
-
- protected override void OnElementChanged(ElementChangedEventArgs<View> e)
- {
- base.OnElementChanged(e);
-
- SetNativeControl(new UIToolbar(RectangleF.Empty));
- UpdateItems(false);
-
- ((Toolbar)Element).ItemAdded += OnItemAdded;
- ((Toolbar)Element).ItemRemoved += OnItemRemoved;
- }
-
- void OnItemAdded(object sender, ToolbarItemEventArgs eventArg)
- {
- UpdateItems(true);
- }
-
- void OnItemRemoved(object sender, ToolbarItemEventArgs eventArg)
- {
- UpdateItems(true);
- }
-
- void UpdateItems(bool animated)
- {
- if (((UIToolbar)Control).Items != null)
- {
- for (var i = 0; i < ((UIToolbar)Control).Items.Length; i++)
- ((UIToolbar)Control).Items[i].Dispose();
- }
- var items = new UIBarButtonItem[((Toolbar)Element).Items.Count];
- for (var i = 0; i < ((Toolbar)Element).Items.Count; i++)
- items[i] = ((Toolbar)Element).Items[i].ToUIBarButtonItem();
-
- ((UIToolbar)Control).SetItems(items, animated);
- }
- }
-} \ No newline at end of file
diff --git a/Xamarin.Forms.Platform.iOS/Xamarin.Forms.Platform.iOS.Classic.csproj b/Xamarin.Forms.Platform.iOS/Xamarin.Forms.Platform.iOS.Classic.csproj
index 1fc4340b..a3ba13c1 100644
--- a/Xamarin.Forms.Platform.iOS/Xamarin.Forms.Platform.iOS.Classic.csproj
+++ b/Xamarin.Forms.Platform.iOS/Xamarin.Forms.Platform.iOS.Classic.csproj
@@ -25,7 +25,8 @@
<MtouchDebug>true</MtouchDebug>
<CodesignKey>iPhone Developer</CodesignKey>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn></NoWarn>
+ <NoWarn>
+ </NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
@@ -38,7 +39,8 @@
<CodesignKey>iPhone Developer</CodesignKey>
<DefineConstants>TRACE;__IOS__;__MOBILE__;</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn></NoWarn>
+ <NoWarn>
+ </NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Turkey|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
@@ -50,11 +52,13 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn></NoWarn>
+ <NoWarn>
+ </NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'AppStore|AnyCPU'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn></NoWarn>
+ <NoWarn>
+ </NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Xamarin.Forms.Core\Properties\GlobalAssemblyInfo.cs">
@@ -141,7 +145,6 @@
<Compile Include="$(MSBuildThisFileDirectory)Renderers\TableViewRenderer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Renderers\TabletMasterDetailRenderer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Renderers\TimePickerRenderer.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)Renderers\ToolbarRenderer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Renderers\WebViewRenderer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Properties\AssemblyInfo.cs" />
<Compile Include="iOSAppIndexingProvider.cs" />
diff --git a/Xamarin.Forms.Platform.iOS/Xamarin.Forms.Platform.iOS.csproj b/Xamarin.Forms.Platform.iOS/Xamarin.Forms.Platform.iOS.csproj
index dde9103e..1f9a92e2 100644
--- a/Xamarin.Forms.Platform.iOS/Xamarin.Forms.Platform.iOS.csproj
+++ b/Xamarin.Forms.Platform.iOS/Xamarin.Forms.Platform.iOS.csproj
@@ -20,7 +20,8 @@
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn></NoWarn>
+ <NoWarn>
+ </NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
@@ -30,7 +31,8 @@
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn></NoWarn>
+ <NoWarn>
+ </NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Turkey|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
@@ -42,11 +44,13 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn></NoWarn>
+ <NoWarn>
+ </NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'AppStore|AnyCPU'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn></NoWarn>
+ <NoWarn>
+ </NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
@@ -120,7 +124,6 @@
<Compile Include="$(MSBuildThisFileDirectory)Renderers\TableViewRenderer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Renderers\TabletMasterDetailRenderer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Renderers\TimePickerRenderer.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)Renderers\ToolbarRenderer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Renderers\WebViewRenderer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Properties\AssemblyInfo.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Extensions\CellExtensions.cs" />