Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug][iOS] Applying an Effect to Frame adds a shadow #9555

Closed
MarcAlx opened this issue Feb 13, 2020 · 6 comments · Fixed by #10469
Closed

[Bug][iOS] Applying an Effect to Frame adds a shadow #9555

MarcAlx opened this issue Feb 13, 2020 · 6 comments · Fixed by #10469

Comments

@MarcAlx
Copy link

MarcAlx commented Feb 13, 2020

Description

When applying an Effect to a <Frame> a shadow is applied on iOS.

Steps to Reproduce

  1. Add an effect to a Frame
<Frame.Effects>
     <controls:ElevationEffect/>
</Frame.Effects>
  1. Launch on iOS
  2. See the shadow applied (not expected)

Expected Behavior

The effect is applied and no extra shadow is added

Actual Behavior

The effect is applied and a shadow is added like if HasShadow = True

Basic Information

  • Version with issue:
  • Last known good version: (Forms) 4.4.0.991640
  • IDE: Visual Studio Mac 8.4.5 (19)
  • Platform Target Frameworks: 4.5.0.142-pre1 +
    • iOS: 4.5.0.142-pre1
    • Android: Doesn't not apply
    • UWP: Not tested
  • Android Support Library Version:
  • Nuget Packages:
  • Affected Devices: iPhone 7 (iOS 13) (real device) also apply on simulator

Screenshots

Ok (4.4.0.991640)

My custom effect is applied (a light shadow)

OK

Ko : (4.5.0.142-pre1 +)

My custom effect is applied and a shadow is added

ko

Reproduction Link

Workaround

Apply your effect as expected then force HasShadow value per platform

<Frame.HasShadow>
      <OnPlatform x:TypeArguments="x:Boolean">
             <On Platform="Android" Value="True" />
             <On Platform="iOS" Value="False" />
      </OnPlatform>
</Frame.HasShadow>
@MarcAlx MarcAlx added s/unverified New report that has yet to be verified t/bug 🐛 labels Feb 13, 2020
@MarcAlx MarcAlx changed the title [Bug][iOS] Applying an Effects to Frame a shadow is applied [Bug][iOS] Applying an Effect to Frame add a shadow Feb 13, 2020
@pauldipietro pauldipietro added this to New in Triage Feb 13, 2020
@MarcAlx MarcAlx changed the title [Bug][iOS] Applying an Effect to Frame add a shadow [Bug][iOS] Applying an Effect to Frame adds a shadow Feb 13, 2020
@MarcAlx
Copy link
Author

MarcAlx commented Feb 13, 2020

After some toughts, the problem is that there's a different behavior between iOS and Android, which wasn't the case in 4.4

To me the question is: should adding an effect to a Frame should override the shadow ?

PS Setting HasShadow to False on Android cause my effect (which creates a shadow) to not display.

@samhouts
Copy link
Member

related to #9519

@samhouts samhouts added this to To do in v4.5.0 Feb 13, 2020
@samhouts samhouts added e/3 🕒 3 and removed s/unverified New report that has yet to be verified labels Feb 18, 2020
@samhouts samhouts added this to To do in Sprint 166 via automation Feb 18, 2020
@samhouts samhouts moved this from New to Ready For Work in Triage Feb 18, 2020
@samhouts samhouts added this to To do in iOS Ready For Work Feb 20, 2020
@samhouts samhouts removed this from Ready For Work in Triage Feb 20, 2020
@samhouts samhouts added this to To do in Sprint 167 Mar 3, 2020
@samhouts samhouts moved this from To do to Continued in next sprint in Sprint 166 Mar 3, 2020
@samhouts samhouts added this to To do in Sprint 168 via automation Mar 23, 2020
@samhouts samhouts moved this from To do to Continued in next sprint in Sprint 167 Mar 23, 2020
@lapoPaolacci
Copy link

lapoPaolacci commented Mar 27, 2020

Same bug if you use a custom renderer instead Effect

if (Element.HasShadow)
{
        Layer.MasksToBounds = false;
        Layer.ShadowColor = UIColor.Black.CGColor;
        Layer.ShadowOffset = new CGSize(0, 5);
        Layer.ShadowRadius = 5;
        Layer.ShadowOpacity = 0.24f;
}

@lypefm
Copy link

lypefm commented Apr 13, 2020

I have the same problem, I use a customrenderer giving a setup and it doesn't work, but in another project with the previous xamarin forms it works

@samhouts samhouts moved this from To do to Continued in next sprint in Sprint 168 Apr 23, 2020
@samhouts samhouts added the in-progress This issue has an associated pull request that may resolve it! label Apr 27, 2020
@samhouts samhouts moved this from To do to In progress in iOS Ready For Work May 6, 2020
@liveinvarun
Copy link

@samhouts Any update on this bug

@samhouts samhouts removed this from Done in v4.6.0 Jul 29, 2020
@samhouts samhouts added this to In Progress in v4.6.0 Jul 29, 2020
@samhouts samhouts moved this from In Progress to Done in v4.6.0 Jul 29, 2020
@samhouts samhouts removed this from Done in v4.6.0 Jul 29, 2020
@samhouts samhouts added this to In Progress in v4.6.0 Jul 29, 2020
@samhouts samhouts moved this from In Progress to Done in v4.6.0 Jul 29, 2020
@samhouts samhouts removed this from Done in v4.6.0 Jul 29, 2020
@samhouts samhouts added this to In Progress in v4.6.0 Jul 29, 2020
@samhouts samhouts moved this from In Progress to Done in v4.6.0 Jul 29, 2020
@samhouts samhouts removed this from Done in v4.6.0 Jul 29, 2020
@samhouts samhouts added this to In Progress in v4.6.0 Jul 29, 2020
@samhouts samhouts moved this from In Progress to Done in v4.6.0 Jul 29, 2020
@samhouts samhouts removed this from Done in v4.6.0 Jul 29, 2020
@samhouts samhouts added this to In Progress in v4.6.0 Jul 29, 2020
@samhouts samhouts moved this from In Progress to Done in v4.6.0 Jul 29, 2020
@samhouts samhouts removed this from Done in v4.6.0 Jul 29, 2020
@samhouts samhouts added this to In Progress in v4.6.0 Jul 29, 2020
@samhouts samhouts moved this from In Progress to Done in v4.6.0 Jul 29, 2020
@samhouts samhouts removed this from Done in v4.6.0 Jul 29, 2020
@samhouts samhouts added this to In Progress in v4.6.0 Jul 29, 2020
@samhouts samhouts moved this from In Progress to Done in v4.6.0 Jul 29, 2020
@samhouts samhouts removed this from Done in v4.6.0 Jul 29, 2020
@samhouts samhouts added this to In Progress in v4.6.0 Jul 29, 2020
@samhouts samhouts moved this from In Progress to Done in v4.6.0 Jul 29, 2020
@samhouts samhouts removed this from Done in v4.6.0 Jul 29, 2020
@samhouts samhouts added this to In Progress in v4.6.0 Jul 29, 2020
@samhouts samhouts moved this from In Progress to Done in v4.6.0 Jul 29, 2020
@samhouts samhouts removed this from Done in v4.6.0 Jul 29, 2020
@samhouts samhouts added this to In Progress in v4.6.0 Jul 30, 2020
@samhouts samhouts moved this from In Progress to Done in v4.6.0 Jul 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/effects a/frame e/3 🕒 3 i/regression in-progress This issue has an associated pull request that may resolve it! p/iOS 🍎 t/bug 🐛
Projects
No open projects
Sprint 166
  
Continued in next sprint
Sprint 167
  
Continued in next sprint
Sprint 168
  
Continued in next sprint
v4.5.0
  
Done
v4.6.0
  
Done
Development

Successfully merging a pull request may close this issue.

5 participants