Skip to content

fix(iOS): clear default NukeUI placeholder background - #433

Merged
duguyihou merged 1 commit into
duguyihou:mainfrom
Navipro70:fix/ios-default-placeholder-background
Jan 21, 2026
Merged

fix(iOS): clear default NukeUI placeholder background#433
duguyihou merged 1 commit into
duguyihou:mainfrom
Navipro70:fix/ios-default-placeholder-background

Conversation

@Navipro70

Copy link
Copy Markdown
Contributor

Summary

NukeUI's LazyImageView creates a default placeholderView with secondarySystemBackground color (#1c1c1e in dark mode).

This prevents users from customizing the background color via React Native styles, as the default placeholder covers the entire view before the image loads.

Changes

Setting placeholderView to nil in init allows the parent view's backgroundColor (set via RN style prop) to be visible.

override init(frame: CGRect) {
  super.init(frame: frame)
  addSubview(lazyImageView)
  // Clear the default NukeUI placeholder (has secondarySystemBackground color)
  lazyImageView.placeholderView = nil
  ...
}

Notes

  • This does not affect custom placeholders (blurhash, thumbhash, memoryCacheKey) - they still work as expected
  • This does not affect the indicator prop - it still works as expected
  • Users can now control background color via the style prop

Fixes #405

NukeUI's LazyImageView creates a default placeholderView with
secondarySystemBackground color (#1c1c1e in dark mode).

This prevents users from customizing the background color via
React Native styles, as the placeholder covers the entire view.

Setting placeholderView to nil in init allows the parent view's
backgroundColor (set via RN style prop) to be visible.

Fixes duguyihou#405
@duguyihou

Copy link
Copy Markdown
Owner

This looks great and definitely improves the project. I’ve just merged it. Appreciate your help!

@duguyihou
duguyihou merged commit b66a4c4 into duguyihou:main Jan 21, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants