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
using ConfigPropertiesHandler #233
using ConfigPropertiesHandler #233
Conversation
A good idea to increase scalability is very clear and good idea. The only concern is the part of the initializer. Default initializer without argument, it is not essential for swift, so there is a possibility of problems. |
that's right. view in UIKit almost no problem for this. but user view is should be problem. i have two counterplot about this.
... oh it's not two. just one only for CustomConfigurablePropertys. |
@gmlwhdtjd oh, i was an idiot. custom view of user can get default reference view at regist. |
@gmlwhdtjd |
anyway this counterplots was so bad approach. 🤪 |
I have some idea of remove new() method thoroughly, Give me a second |
oh my god, oh no you are god. |
…ng propertiesHandler
I changed to provide defaultReferenceView unconditionally when registering propertiesHandler. And for unregistered views, defaultReferenceView of superclass is used. This wasn't a problem at all, and this way I was able to remove the new() method entirely. |
it seems much more clearly. 👍 |
38d23d7
into
Better-way-to-implement-DefaultConfigurablePropertys
* Crate DefaultConfigurablePropertys as a separate file * using ConfigPropertiesHandler (#233) * using ConfigPropertiesHandler * apply UILabel, UIButton * apply UIImageView, UIStackView * add default configurable properties for CustomConfigurableView * modify DefaultConfigurablePropertys to ConfigurableProperties * add unregist properties of view type * CustomConfigurablePropertys has higher priority than registed properties * separate prepared configurable properties * regist at create default instance of ConfigurableProperties * Move accessibility property to UIView's property and clean up the code * hide regist from outside of module * remove unnecessary function * readd removed test * remove unnecessary init definition from CustomConfigurableProperties * refactoring default reference view setting * remove unnecessary test code * test failed - testCustomRegistedConfigurableViewDefaultConfigurableProperties * test succeed - testCustomRegistedConfigurableViewDefaultConfigurableProperties * Change to provide defaultReferenceView unconditionally when registering propertiesHandler Co-authored-by: gmlwhdtjd <gmlwhdtjd@naver.com> Co-authored-by: oozoofrog <oozoofrog@gmail.com>
* deprecate callAsFunction for UIView * update test * update readme * update SwiftLayoutUtil.ViewPrinter to use sublayout(_:) Method * update ViewPrinterTests * add comments for anchor combinating functions (#227) * View printer congifuration (#226) * add ConfigurationPrintable * add missing double quotation marks at UIView+ConfigurationPrintable.swift accessibilityLabel propterty * Change ConfigurableProperty to a user-extensible structure * Add defaultConfigurablePropertys for UIControl / Provide a way to add other default views * add accessibilityDefaultConfigurablePropertys * Changed configurationName to fully express the output format * add uiImageViewDefaultConfigurablePropertys * add uiStackViewDefaultConfigurablePropertys & ConfigurationName extension clean up * update ConfigurableProperty to use custom getter for get value * add uiButtonDefaultConfigurablePropertys * change configurationName to configuration * update Configuration for UIImage, UIFont, UIColor * add tests for Configuration * add test for CustomConfigurablePropertys Co-authored-by: oozoofrog <oozoofrog@gmail.com> * Add combination anchor method to use CGSize (#228) * [renaming] defualt -> default (#229) * Config properties sorting (#230) - sort config properties - sort config properties printing results - update tests * Change the configuration output of UIImage, UIFont, and UIColor to multi-line comments (#231) * Better way to implement DefaultConfigurablePropertys (#232) * Crate DefaultConfigurablePropertys as a separate file * using ConfigPropertiesHandler (#233) * using ConfigPropertiesHandler * apply UILabel, UIButton * apply UIImageView, UIStackView * add default configurable properties for CustomConfigurableView * modify DefaultConfigurablePropertys to ConfigurableProperties * add unregist properties of view type * CustomConfigurablePropertys has higher priority than registed properties * separate prepared configurable properties * regist at create default instance of ConfigurableProperties * Move accessibility property to UIView's property and clean up the code * hide regist from outside of module * remove unnecessary function * readd removed test * remove unnecessary init definition from CustomConfigurableProperties * refactoring default reference view setting * remove unnecessary test code * test failed - testCustomRegistedConfigurableViewDefaultConfigurableProperties * test succeed - testCustomRegistedConfigurableViewDefaultConfigurableProperties * Change to provide defaultReferenceView unconditionally when registering propertiesHandler Co-authored-by: gmlwhdtjd <gmlwhdtjd@naver.com> Co-authored-by: oozoofrog <oozoofrog@gmail.com> * update README.md for 2.6.0 Co-authored-by: gmlwhdtjd <gmlwhdtjd@naver.com>
i have rough idea want showing up.
@gmlwhdtjd
By
ETC
principal code is newly added regist() function and that is main result of this idea.
all of codes has in rough.
UIView and subclasses has same initializer, and in most cases, it's okay to create it directly from the type. for default reference view. additionally, can hand over default reference view instance upon request.
adding ConfigPropertiesHandlable for customizable and standardization to regist configurable properties.
using regist function for regist prepared configs and, also adding custom configs.
CustomConfigurablePropertys also good approach for customzing of properties, i want both. so may this needs priority. currently, CustomConfigurablePropertys more higher priority than registed properties.
DefaultConfigurablePropertys now has some logics and contains value, so change name and type to final class ConfigurableProperties and add default static self instance.