peterprokop / SwiftOverlays

SwiftOverlays is a Swift GUI library for displaying various popups and notifications
MIT License
631 stars 83 forks source link

Blocking Overlay with Progress View #28

Open zmears opened 7 years ago

zmears commented 7 years ago

I did not see a blocking overlay with a progress view so I attempted to create one.

I think the progress view should be really be above the text, but I was not sure how to get it there without a bunch of copy pasta code.

Maybe there could be a layout option? something that puts the accessory view above the label instead of beside it.

https://github.com/zmears/SwiftOverlays/tree/blockingProgressView

zmears commented 7 years ago

I updated my branch with centering logic that worked for my use case. I am not 100% sure this is the correct approach as I could not find any examples of frame.offsetBy and I do no normally do layout programatically.

I would love some feedback on my changes and look forward to further discussion.