Please note .stroke(Color("red"), lineWidth:4). If I change this to use a system colour i.e. .stroke(Color.red, lineWidth:4) then the same test produces the following screenshot (which is a bit close to what I would expect):
My app also has some views that are stacked on top of other views, some of them using the .offset modifier, and I don't believe that is picked up either i.e. in the screenshots the 3 (out of 4) visible icons should be at the bottom as they are part of a custom nav bar. I can probably live with this as long as we have a working solution for custom colours.
PS: In my assets catalogue, the custom colour is targeting both the app and tests targets.
I have the same problem when taking a screen shot of a viewController that contains a custom button with a font. when I delete the line of setting the font (titleLabel?.font = titleFont), the screen shot is correct.
Hi everyone! I don't know if I am doing something wrong but when I take a screenshot it looks like this:
After a few hours of investigating, I came to the conclusion that custom colours are not visible in the screenshot. I have a view like the following:
Please note
.stroke(Color("red"), lineWidth:4)
. If I change this to use a system colour i.e..stroke(Color.red, lineWidth:4)
then the same test produces the following screenshot (which is a bit close to what I would expect):My app also has some views that are stacked on top of other views, some of them using the
.offset
modifier, and I don't believe that is picked up either i.e. in the screenshots the 3 (out of 4) visible icons should be at the bottom as they are part of a custom nav bar. I can probably live with this as long as we have a working solution for custom colours.PS: In my assets catalogue, the custom colour is targeting both the app and tests targets.