Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request - access to root xib view #127

Open
Gargo opened this issue Jul 13, 2023 · 0 comments
Open

Feature request - access to root xib view #127

Gargo opened this issue Jul 13, 2023 · 0 comments

Comments

@Gargo
Copy link

Gargo commented Jul 13, 2023

From your readme:

final class MyCustomWidget: UIView, NibOwnerLoadable {
  …
  required init?(coder aDecoder: NSCoder) {
    super.init(coder: aDecoder)
    self.loadNibContent()
  }
}

The problem is I loose a link to xib root view and can access it via MyCustomWidget().subviews property only or by making a link to this view manually each time.

Why it is required? For example, I create a subview with labels which should be added to a view controller with a dark background. So I make subview's background dark in xib (to see light labels) and change this color back in runtime.

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

No branches or pull requests

1 participant