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

Deprecate internal properties #36

Closed
klaaspieter opened this issue Jul 10, 2017 · 3 comments
Closed

Deprecate internal properties #36

klaaspieter opened this issue Jul 10, 2017 · 3 comments

Comments

@klaaspieter
Copy link
Contributor

Currently we expose properties for backgroundColor, backgroundView, stackView, axis seperatorViewFactory and scrollView. Ideally a user won't be able to modify the state of stackView, seperatorViewFactory and scrollView without going through StackViewController directly.

Being able to modify properties of the stack view directly makes it possible for a user to reconfigure it in such a way that it isn't compatible with the current configuration of the StackViewController anymore. Similarly being able to change the axis after initialization complicates the implementation of StackViewController because it always needs to account for the fact the the axis might change.

axis, separatorViewFactory and backgroundView should be injected in the initializer and not changed after StackViewConroller is initialized.

stackView scrollView properties that we want the user to modify should be exposed directly on the StackViewController. For example if we want the user to be able to scroll we could expose scroll(toViewController:) or scroll(toRect:) on StackViewController directly.

We can keep backgroundColor, but I think it should be implemented as a convenience for backgroundView.backgroundColor = .

@mergesort
Copy link
Contributor

I saw that these were deprecated in a few commits such as this one, but it is causing a lot of warnings to crop up when using StackViewController as a dependency.

Here is one example below:
Example

@klaaspieter
Copy link
Contributor Author

Those warnings should go away because the deprecated properties will be made (file)private. Afaik there is no way to tell Xcode to only mark properties deprecated to the outside so unfortunately you'll get warnings if you build the project as part of your app's build process (CocoaPods does this).

@klaaspieter
Copy link
Contributor Author

Closed by 574aa6e

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

2 participants