summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.ControlGallery.iOS
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@users.noreply.github.com>2017-08-10 17:35:27 (GMT)
committerJason Smith <jason.smith@xamarin.com>2017-08-10 17:35:27 (GMT)
commit1aab6ff4893935fb3bb91187d2d3fa796576198a (patch)
tree99a4adc0b178cc5619496d17c7feeb2a8f55607d /Xamarin.Forms.ControlGallery.iOS
parentec10a37ff125fd920616649ec9ffde2f51d77a37 (diff)
downloadxamarin-forms-1aab6ff4893935fb3bb91187d2d3fa796576198a.zip
xamarin-forms-1aab6ff4893935fb3bb91187d2d3fa796576198a.tar.gz
xamarin-forms-1aab6ff4893935fb3bb91187d2d3fa796576198a.tar.bz2
Repro 58406; apply effects to fast renderers on Android (#1077)
Diffstat (limited to 'Xamarin.Forms.ControlGallery.iOS')
-rw-r--r--Xamarin.Forms.ControlGallery.iOS/Properties/AssemblyInfo.cs2
-rw-r--r--Xamarin.Forms.ControlGallery.iOS/Xamarin.Forms.ControlGallery.iOS.csproj1
-rw-r--r--Xamarin.Forms.ControlGallery.iOS/_58406EffectRenderer.cs29
3 files changed, 31 insertions, 1 deletions
diff --git a/Xamarin.Forms.ControlGallery.iOS/Properties/AssemblyInfo.cs b/Xamarin.Forms.ControlGallery.iOS/Properties/AssemblyInfo.cs
index d11d7e2..78e7d1d 100644
--- a/Xamarin.Forms.ControlGallery.iOS/Properties/AssemblyInfo.cs
+++ b/Xamarin.Forms.ControlGallery.iOS/Properties/AssemblyInfo.cs
@@ -37,7 +37,7 @@ using Xamarin.Forms.Controls;
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion ("1.0.0.0")]
[assembly: AssemblyFileVersion ("1.0.0.0")]
-[assembly: Xamarin.Forms.ResolutionGroupName("XamControl")]
+[assembly: Xamarin.Forms.ResolutionGroupName (Xamarin.Forms.Controls.Issues.Effects.ResolutionGroupName)]
// Deliberately broken image source and handler so we can test handling of image loading errors
[assembly: ExportImageSourceHandler(typeof(FailImageSource), typeof(BrokenImageSourceHandler))] \ No newline at end of file
diff --git a/Xamarin.Forms.ControlGallery.iOS/Xamarin.Forms.ControlGallery.iOS.csproj b/Xamarin.Forms.ControlGallery.iOS/Xamarin.Forms.ControlGallery.iOS.csproj
index 17d3178..33881ea 100644
--- a/Xamarin.Forms.ControlGallery.iOS/Xamarin.Forms.ControlGallery.iOS.csproj
+++ b/Xamarin.Forms.ControlGallery.iOS/Xamarin.Forms.ControlGallery.iOS.csproj
@@ -161,6 +161,7 @@
<Compile Include="Main.cs" />
<Compile Include="AppDelegate.cs" />
<Compile Include="_57114Renderer.cs" />
+ <Compile Include="_58406EffectRenderer.cs" />
<None Include="app.config" />
<None Include="Info.plist" />
<Compile Include="Properties\AssemblyInfo.cs" />
diff --git a/Xamarin.Forms.ControlGallery.iOS/_58406EffectRenderer.cs b/Xamarin.Forms.ControlGallery.iOS/_58406EffectRenderer.cs
new file mode 100644
index 0000000..6301f00
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.iOS/_58406EffectRenderer.cs
@@ -0,0 +1,29 @@
+using System.Linq;
+using UIKit;
+using Xamarin.Forms;
+using Xamarin.Forms.Controls.Issues;
+using Xamarin.Forms.Platform.iOS;
+
+[assembly: ExportEffect(typeof(Xamarin.Forms.ControlGallery.iOS._58406EffectRenderer), Bugzilla58406.EffectName)]
+
+namespace Xamarin.Forms.ControlGallery.iOS
+{
+ public class _58406EffectRenderer : PlatformEffect
+ {
+ protected override void OnAttached()
+ {
+ var tv = Control as UILabel;
+
+ if (tv == null)
+ {
+ return;
+ }
+
+ tv.Text = new string(tv.Text.ToCharArray().Reverse().ToArray());
+ }
+
+ protected override void OnDetached()
+ {
+ }
+ }
+} \ No newline at end of file