-
Notifications
You must be signed in to change notification settings - Fork 24
Add ProgressView #82
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
base: master
Are you sure you want to change the base?
Add ProgressView #82
Conversation
| progressView.setProgress(progress ?? 0, animated: true) | ||
| } | ||
|
|
||
| if let uiStackView = view as? UIStackView { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can add else to this if condition so the flow is clearer.
if let progressView = view as? UIProgressView {
} else if let uiStackView = view...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
|
|
||
| extension ProgressView: Renderable { | ||
| public func createView(context: Context) -> UIView { | ||
| if (progress != nil) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can move this 4 view creation flows to a separate function each, and call them from this function, in order to make this one cleaner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed plz check
| if (progress != nil) { | ||
| /// Determinate Progress View | ||
| if (title != nil) { | ||
| let titleView = UITextView() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use a UILabel instead of a TextView. A text view can have the contents edited directly by the user (I think this is not the intended behavior right?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. Fixed.
| let indicatorView = UIActivityIndicatorView(style: .whiteLarge) | ||
| indicatorView.color = .gray | ||
| indicatorView.startAnimating() | ||
| let titleView = UITextView() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, you can use a label
No description provided.