Skip to content

backgroundColor for AnimatableStackView not set by FillDesignable #461

Open
@SD10

Description

@SD10

Issue

backgroundColor for AnimatableStackView not set by FillDesignable protocol and remains nil

Apparently UIStackView is a non-drawing view so drawRect() is never called and the backgroundColor is not applied.

EDIT: This obviously affects setting the opacity as well

Possible Solutions

We can possibly solve this by:

  1. Adding a backing CAShapeLayer with the background color in layoutSubviews()
  2. Adding a backing UIView with the background color in layoutSubviews()

This is not my domain of expertise so I thought I would bounce some ideas off the rest of you.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions