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

JGProgressHUDStyleNone #18

Merged
merged 1 commit into from
Jan 7, 2015
Merged

Conversation

krzyzanowskim
Copy link
Contributor

Do not apply effects with new HUD style "None" - useful for custom huds.

@JonasGessner
Copy link
Owner

Thanks! I will merge this the next time I update the library.

JonasGessner added a commit that referenced this pull request Jan 7, 2015
Added JGProgressHUDStyleNone.
@JonasGessner JonasGessner merged commit b378645 into JonasGessner:master Jan 7, 2015
@JonasGessner
Copy link
Owner

Actually, after looking at the code and thinking a lot about this I decided to revert this commit.

The "none" style defaults to black elements, but you cannot have white elements. Because of the differences between iOS 7 and 8, it is hard to actually fully customize the HUD when it is set to "none" mode. I thought about expanding this to JGProgressHUDStyleNoneLight and JGProgressHUDStyleNoneDark but there's another big problem, the names: JGProgressHUDStyleDark means that the HUD is dark and that the elements are light, JGProgressHUDStyleLight means that the HUD is light and the elements are dark. So if we were to make JGProgressHUDStyleNoneLight and JGProgressHUDStyleNoneDark, what would the Light and Dark stand for? The color of the elements, one might say, so JGProgressHUDStyleNoneLight would have a transparent background and light elements and JGProgressHUDStyleNoneDark would have a transparent background and dark elements, seems logical! But looking back at JGProgressHUDStyleDark and JGProgressHUDStyleLight, the colors of the elements are suddenly switched!? JGProgressHUDStyleDark has light elements but JGProgressHUDStyleNoneDark has dark elements? Ok so what if we called it JGProgressHUDStyleNoneLight and gave that style dark elements! Well then the name doesn't make any sense anymore, and the other way round the colors of the elements differ for the same naming scheme, so you're basically stuck and there's not a good solution to this problem.

Therefore I decided to get rid of the "none" style again, also because having a clear background doesn't make sense to me. The 3 available styles are fine and can be used in any case and have a great look, there's nothing that needs to be changed, so why change it? :)

JonasGessner added a commit that referenced this pull request Jan 7, 2015
• Removed asserts.
• Some fixes for Swift.
• Removed JGProgressStyleNone (See #18 to know why).
• Made base SDK >= iOS 8 obligatory.
@krzyzanowskim
Copy link
Contributor Author

without "none" or transparent, you can't create custom progress with custom shape without forced border view. In particular you can't create progress that is spinning only, without background. My point is that since you allowed custom views, it should be possible to create clean view, without any background. Additinaly on iOS8 "UIBlurEffect" view is messing up.

@JonasGessner
Copy link
Owner

OK but there needs to be a good solution which is not totally confusing (as I explained in my previous comment) or only offers one element color (your pull request).

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

Successfully merging this pull request may close these issues.

None yet

2 participants