Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ N/A

- `AnimatableTextField` won't override anymore the default border if no custom one set. [#457](https://github.com/IBAnimatable/IBAnimatable/pull/457) by [tbaranes](https://github.com/tbaranes)
- Make `placeholderColor` working with `placeholderText` AND `placehodler`. It will keep the current priorirty: `placeholderText` > `placehodler`. [#459](https://github.com/IBAnimatable/IBAnimatable/pull/459) by [@tbaranes](https://github.com/tbaranes)
- Fix `FillDesignable` protocol to set `fillColor` for `UICollectionViewCell`. [#462](https://github.com/IBAnimatable/IBAnimatable/pull/462) by [@SD10](https://github.com/SD10)
- Fixed `AnimatableTextField` interface update when using it programatically [#458](https://github.com/IBAnimatable/IBAnimatable/pull/458) by [@tbaranes](https://github.com/tbaranes)

---
Expand Down
16 changes: 13 additions & 3 deletions IBAnimatable/FillDesignable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ public extension FillDesignable where Self: UIView {
alpha = opacity

// Make better performance
if opacity == 1 {
isOpaque = true
}
isOpaque = opacity == 1
}
}
}
Expand All @@ -44,6 +42,18 @@ public extension FillDesignable where Self: UITableViewCell {
}
}

public extension FillDesignable where Self: UICollectionViewCell {
public func configureFillColor() {
if let fillColor = fillColor {
backgroundColor = fillColor
contentView.backgroundColor = fillColor
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look like this is a case we keep fillColor 😁

} else if let predefinedColor = predefinedColor?.color {
backgroundColor = predefinedColor
contentView.backgroundColor = predefinedColor
}
}
}

private extension FillDesignable {

func predefinedColor(string predefinedColor: String?) -> UIColor? {
Expand Down