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

UIView Loading Indicator #12

Open
giovanepossebon opened this issue Aug 15, 2016 · 8 comments
Open

UIView Loading Indicator #12

giovanepossebon opened this issue Aug 15, 2016 · 8 comments

Comments

@giovanepossebon
Copy link
Contributor

  • Create an UIView extension with loading indicators, with:
    • startLoading;
    • stopLoading;

We can change view opacity to a low level, hiding view information while the data are loading;

This way we have:

  • view.startLoading()
  • view.startLoading(withOpacityLevel: 0.3)
  • view.startLoading(withCustomHUD: HUD.Normal, withOpacityLevel: 0.5)
  • view.stopLoading()
@Morbix
Copy link
Member

Morbix commented Aug 15, 2016

@giovanepossebon I was wonder if add the spinner in the view with low opacity, the just added subview will be low opacity too, wont be?

@giovanepossebon
Copy link
Contributor Author

giovanepossebon commented Aug 15, 2016

@Morbix I thought about that, and we need to find an alternative to this, 'cause you are right, the opacity will affect the whole view, including the spinner

@Morbix
Copy link
Member

Morbix commented Aug 15, 2016

@giovanepossebon maybe working with the sublayers, or, caching the backgroundColor and setting the same color with alpha componente and setting the opacity just of the subviews.

@giovanepossebon
Copy link
Contributor Author

@Morbix Can't we add as a superview centered in the view?

@Morbix
Copy link
Member

Morbix commented Aug 15, 2016

@giovanepossebon sounds tricky, but it is not a bad ideia. It might works very well with autolayout's constraints.

@Morbix
Copy link
Member

Morbix commented Aug 15, 2016

@giovanepossebon When do you will stop the bullshit talk and start?

@giovanepossebon
Copy link
Contributor Author

@Morbix When the time comes! hehe easy boy!

@Morbix
Copy link
Member

Morbix commented Aug 15, 2016

@giovanepossebon We will never got the time for this kind of things. We have to practice parallelism!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants